if and for or if and while

Write your question here.

hello I need to write a program with if and for or if and while statements in one program could someone help me?

I need a really simple program with if and for or a program with if and while. Please help me
Last edited on
Ask the user to input some numbers. When the user is done, tell him how many of them were odd (or primes, or whatever).
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include<iostream>
using namespace std;
int main()
{
int i=0;
if(i==0){
for(i=1;i<10;i++){
cout<<"Im New here xD"<<endl;
}
}
if(i!=0){
while(i>0){
cout<<"Im still new"<<endl;
i--;
}
}
}
Could I get one more example? I'm using dev-c++ software.
Make the program to read the text of your post(s) from a while and to count the occurrences of "if".
Topic archived. No new replies allowed.