Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tornikegomareli/a3b4e9a840d6f259950b6a90b199c1e2 to your computer and use it in GitHub Desktop.
Save tornikegomareli/a3b4e9a840d6f259950b6a90b199c1e2 to your computer and use it in GitHub Desktop.
C++ Students, count of odd numbers
#include <iostream>
using namespace std;
int main()
{
int counter = 0;
int mtvleli = 0;
while (counter < 500)
{
if (counter % 2 == true)
{
mtvleli++;
}
counter++;
}
cout << " Kentebis raodenoba 500 ricxvshi " << mtvleli;
cin.get();
cin.get();
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment