Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   pls help (http://www.go4expert.com/forums/pls-help-t4767/)

weirdo_xto 20Jun2007 08:03

pls help
 
can you make a program in C that inputs 10 numbers and output if it is odd or even and the number from lowest to highest... pls ^^ :)

shabbir 20Jun2007 08:10

Re: pls help
 
Looks like its your assignment and its you who should be doing it. We can always help you in the process but just can't give you all the code you need to submit to your faculty

weirdo_xto 20Jun2007 08:16

Re: pls help
 
just a code for odd or even...pls

shabbir 20Jun2007 08:21

Re: pls help
 
Code:

if(number%2 == 0)
  printf("Number is Even");
else
  printf("Number is Odd");


cheap freelancer 20Jun2007 13:14

Re: pls help
 
Code:

for(int i=0; i < 10;i++) {
cout << "Enter a number" << endl;
cin >> number;
if(number%2 == 0)
  printf("Number is Even");
else
  printf("Number is Odd");
}



All times are GMT +5.5. The time now is 07:02.