Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I've accidentally disabled my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't...
Answer
#6: Post edited
I accidentally **disabled** my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't necessarily working.- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
- I've accidentally **disabled** my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't necessarily working.
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
#5: Post edited
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
I accidentally disabled my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't necessarily working.
- I accidentally **disabled** my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't necessarily working.
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
#4: Post edited
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
I feel like adding a comment, please do bear in mind that this code isn't necessarily working. You need to try it on your own.
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
- I accidentally disabled my account hence I'm answering the questions that I've answered before again. Adding on to this, I feel like adding a comment, please do bear in mind that this code isn't necessarily working.
#3: Post edited
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
putStr "End"}```
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
- I feel like adding a comment, please do bear in mind that this code isn't necessarily working. You need to try it on your own.
#2: Post edited
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
- Solution:
- ```
- myProgram = do {
- putStrLn "Enter three sides: ";
- str<-getLine;
- putStr "RightAngle: ";
- print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2))));
- putStr "Isosceles: ";
- print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1));
- putStr "Equilateral: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2));
- putStr "Scalene: ";
- print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3));
- putStr "End"}```
#1: Initial revision
Solution: ``` myProgram = do { putStrLn "Enter three sides: "; str<-getLine; putStr "RightAngle: "; print (snd(head (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)))); putStr "Isosceles: "; print (snd (classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!1)); putStr "Equilateral: "; print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!2)); putStr "Scalene: "; print (snd(classify (head (strtok str)) (strtok str!!1) (strtok str!!2)!!3)); putStr "End"}```