Math, asked by akshuntt, 11 months ago

if else statement can work with how many data types

Answers

Answered by Anonymous
4

Just curious is there a way to set an if statement condition that checks if value is equal to a data type. Like if (x=int) kind of thing.

I am suppose to create a program that checks for prime numbers but i do not know how to do it other than divide the number(entered by user) by the building block number (2-9(excluding 1 because all numbers are divisible ...)) and if all of them return a float then the number is prime.

I also think this way is inefficient but again i do not have any other clue how i would do it. So if possible some ideas would work too.

Plzz follow me thanks plzz ❤❤❤

Similar questions