Sunday 25 March 2012

Menampilkan bilangan ganjil dari 0 sampai dengan 10

#include <iostream>
#include <string>
using namespace std;
int main()
{
   int i;
   i =1;
   while
(!(i>10))
   {
      if (i % 2==0)
      {
      }
      else
      {
         cout << i << endl;      }
      i =i+1;
   }
   system("pause");
   return 0;
}

No comments:

Post a Comment