8.1.. Prebrojati prirodne brojeve od 1 do 5.

Listing programa:

//p08112085//
#include <iostream>
using namespace std;

int main()
{
	int i,br;
	br=0;
	for(i=1;i<=5;i++)
	    br=br+1;	
	cout<<"Prebrojanih ima: "<<br<<endl;
	system("pause");
	return 0;
}

Ispis na ekranu:

Index