6.4.. Napisati program koji izračunava i ispisuje rezultate:
ROUND (11.7)
ROUND(2,7)
ROUND(-2,6)
ROUND(-2,1)
ROUND(2,2)
1- ROUND(-1,9)
Opis rješenja:
Opis programa:
Listing programa:
// 06411130
#include <iostream>
#include <cmath>
using namespace std;
int main() {
cout<<round(11.7)<<endl;
cout<<round(2.7)<<endl;
cout<<round(-2.6)<<endl;
cout<<round(-2.1)<<endl;
cout<<round(2.2)<<endl;
cout<<1- round(-1.9)<<endl;
return 0;
}
Ispis na ekranu:
Index
|
|