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

Index
|