output is a shown in attachment..Code:#include<iostream> using namespace std; int main() { using namespace std; float a=2e+6; cout<<a<<endl; float b=a+1; cout<<b<<endl; cout<<b-a<<endl; return 0; }
if b and a are same then why their subtraction gives 1??
however i have assigned b=a+1.. if it is so then why both are shown same??




Reply With Quote