I have com across a program in which I should take 17 as a global constant.
I have to take 17 inputs.
for those inputs ..
I have to find
the number of even numbers entered
the number of odd numbers entered
the number of prime numbers entered
smallest number among those 17
largest number among those 17
factorial of the smallest number
the first number
the last number
power of the first number and the last number
These should come under a single main function.
I have done
number of even
number of odd
number of prime
I am finding some difficulties in finding
largest and smallest numbers
The main problem is I should not use arrays as well as any other functions for these..
So without using arrays
I have to find a solution..
Please can u help me in finding a solution using for loops,while loops
etc.
I have to take 17 inputs.
for those inputs ..
I have to find
the number of even numbers entered
the number of odd numbers entered
the number of prime numbers entered
smallest number among those 17
largest number among those 17
factorial of the smallest number
the first number
the last number
power of the first number and the last number
These should come under a single main function.
I have done
number of even
number of odd
number of prime
I am finding some difficulties in finding
largest and smallest numbers
The main problem is I should not use arrays as well as any other functions for these..
So without using arrays
I have to find a solution..
Please can u help me in finding a solution using for loops,while loops
etc.
Comment