count-odd
This program reads in integers until the user enters 0. Count how many numbered entered are odd and output that total at the end of the program.
24
 
1
#include <iostream>
2
using namespace std;
3
4
int main() {
5
 
6
   // You may declare avariables below or add any additional
7
   //  code before the loop starts.
8
9
10
11
12
   // Use a loop and selection idiom below
13
 
14
           (                 )  {
15
     cout << "Enter an integer or 0 to quit:" << endl;
16
     cin >>        ;
17
18
19
20
   }
21
22
   cout << "You entered " <<           << " odd numbers" << endl;
23
   return 0;
24
}