+ 1
Is switch only able for integrer??
I am trying to use a switch with doubles but it requieres an int, is there a way in which I can use it writing doubles?
4 ответов
+ 3
You could always round it out or even multiply it by 100 to get an integer form of your value to use in the switch.
However, what are you trying to accomplish? May be a better way overall
+ 3
You're welcome!
What type of math problems are you trying to solve via this program? If you give me more information, I may be able to type up some functions that'll work out better than using a "switch hack" to solve the issue.
+ 1
That's a very smart idea, to multiply it, operare and then divide again, thanks, I was trying a program that could solve some mathematical problems from school, Thanks so much:)
+ 1
Some basic trigonometry problems, in which you enter an angle and a side and it solve the rest of solutions. I am using the switch bc I am not able to find a way of using loops🤔