Odpowiedź :
Odpowiedź:
Program reaguje gdy wpiszesz 0, pisany w codeblocks.
#include <iostream>
#include <stdio.h>
#include <cstdlib>
#include <conio.h>
#pragma warning(suppress : 4996)
#pragma warning(disable : 4996)
using namespace std;
float x, y;
char wybor;
int main()
{
for (;;)
{
cout << "Podaj 1 liczbe: ";
cin >> x;
cout << "Podaj 2 liczbe: ";
cin >> y;
cout << endl;
cout << "MENU GLOWNE" << endl;
cout << "-----------------" << endl;
cout << "1. Oblicz" << endl;
cout << "2. Wyjdz" << endl;
cout << endl;
wybor = getch();
switch (wybor)
{
case '1':
if (y, x == 0) cout << "Bład";
else cout << "Pole = " << x*y;
break;
case '2':
exit(0);
break;
default: cout << "Nie ma takiej opcji w menu!";
}
getchar(); getchar();
system("cls");
}
return 0;
}