7.3.. Napisati program za ispis osobina zadanog kvadranta, prema slijedeæoj tabeli:
Listing programa:
//07311005
#include <iostream>
using namespace std;
int main()
{
int a;
cout << "Kvadrant" << endl;
cout << "Broj kvadranta ";
cin>>a;
switch(a)
{
case 1: cout << "x>0 i y>0" << endl; break;
case 2: cout << "x<0 i y>0" << endl; break;
case 3: cout << "x<0 i y<0" << endl; break;
case 4: cout << "x>0 i y<0" << endl; break;
default: cout << "Greska" << endl;
}
return 0;
}
Ispis na ekranu:
Index
|