Murat_8989
New member
- Katılım
- 28 Nis 2006
- Mesajlar
- 13
- Reaction score
- 0
- Puanları
- 0
Herkese selam millet bi türlü çözemedim yardımcı olursanız sevinirim.Bu arada iostream değilde stdio.h ve if komutlarıyla yapabilirsek sevinirim...
Write a C program which inputs a positive integer ‘n’ from the user. If ‘n’ is even, your program will display all even numbers less than ‘n’ and sum of them. If ‘n’ is odd, your program will display all odd numbers less than ‘n’ and sum of them.
Sample Run:
Enter n: 15
Odd numbers less then 15: 1 , 3, 5 , 7 , 9 , 11 , 13
Sum of them : 49
Şimdiden teşekkürler.
Write a C program which inputs a positive integer ‘n’ from the user. If ‘n’ is even, your program will display all even numbers less than ‘n’ and sum of them. If ‘n’ is odd, your program will display all odd numbers less than ‘n’ and sum of them.
Sample Run:
Enter n: 15
Odd numbers less then 15: 1 , 3, 5 , 7 , 9 , 11 , 13
Sum of them : 49
Şimdiden teşekkürler.