#include <iostream>
#include <cmath>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main(int argc, char** argv)
{
float pi,r,pole;
cout<<"Podaj promien kola (r):"<<endl;
cin>>r;
pi=3,141592;
pole=pi*r*r;
cout<<"Pole powierzchni kola wynosi:"<<pole;
system("pause");
return 0;
}
Np. przy r=4 podaje wynik 48, a prawidłowym wynikiem (3,141592*4*4) jest w zaokrągleniu 50. Przy innej wartości r także podaje minimalny błąd