#include<bits/stdc++.h> #define s std:: int main() { //rounding error s cout<< s setprecision(17); double a(1.0); double b(.1+.1+.1+.1+.1+.1+.1+.1+.1+.1); double c(.1*10); s cout<<a<<s endl; s cout<<b<<s endl; s cout<<c<<s endl; } output: 1 0.99999999999999989 1
Input: #include<bits/stdc++.h> #define s std:: #define pi acos(-1) int main() { int x=014; int y=0x34; int bin=0b11; s cout<<"Octal "<<x<<"\nHexa decimal "<<y<<"\nBinary "<<bin<<s endl; } Output: Octal 12 Hexa decimal 52 Binary 3 Process returned 0 (0x0) execution time : 0.050 s Press any key to continue.
মন্তব্যসমূহ
একটি মন্তব্য পোস্ট করুন