Can someone help me to create this program? |
PLEASE learn to use code tags, they make reading and commenting on source code MUCH easier. http://www.cplusplus.com/articles/jEywvCM9/ http://www.cplusplus.com/articles/z13hAqkS/ HINT: you can edit your post and add code tags. Some formatting & indentation would not hurt either |
input an integer if (the number is zero) ( then print 'unable to divide otherwise if(number is divisble by 2) ( print 'the number is even' divisor = number divided by 2 print 'number = divisor times 2' ) otherwise print 'the number is not divisible by 2' ) |
Can someone help me to create this program? |
Using Conditional Statement create a program to find if the number is divisible by 2 (also 2 is multiplied by the divisor) and if the n is not divisible by 2 and lastly if the n is unable to divide. example input/output: Enter number: 24 24 is divisible by 2 ( 2 is multiplied by 12) Enter number: 33 33 is not divisible by 2 Enter number: 0 unable to divide. Can someone help me to create this program? thank you. |