7.3.. Napisati program za ispis uspjeha, prema slijedeæoj tabeli:

Listing programa:

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

int main()
{
	int oc;
	cout << "Uspjeh" << endl;
	cout << "Ocjena (1 5): ";
	cin >> oc;
	switch(oc)
	{
        case 1: cout << "Nedovoljan" << endl; break;
        case 2: cout << "Dovoljan" << endl; break;
        case 3: cout << "Dobar" << endl; break;
        case 4: cout << "Vrlodobar" << endl; break;
        case 5: cout << "Odlican" << endl; break;
        default: cout << "greska, morate unijeti brojeve od 1 do 5" << endl;
	}

	return 0;
}

Ispis na ekranu:

Index