8.1.. Ispisati neparne prirodne brojeve od 1 do 5.
Listing programa:
//p08211042//
#include <iostream>
using namespace std;
int main()
{
int i;
i=1;
while (i<=5 )
{
if (i%2!=0)
cout<<i<<endl;
i++;
}
system("pause");
return 0;
}
Ispis na ekranu:

Index
|