i am a newbie to c++ i have a doubt
when we give cin the curso appears asking for the use to enter the info
eg:
cout "Enter Number:";
cin >> i;
will display
Enter Number:_(cursor)
i want a default value to be displayed...
like:
Enter Number:95
the use can change it at his option..
is this possible using C++?
i have another doubt
int a,b;
float c;
a=15;
b=16;
c=a/b;
cout << c;
output: "0"
why is it not .975?
if i change a or b to float it gives .975, why?
Known is handfull, Unknown is worldfull
when we give cin the curso appears asking for the use to enter the info
eg:
cout "Enter Number:";
cin >> i;
will display
Enter Number:_(cursor)
i want a default value to be displayed...
like:
Enter Number:95
the use can change it at his option..
is this possible using C++?
i have another doubt
int a,b;
float c;
a=15;
b=16;
c=a/b;
cout << c;
output: "0"
why is it not .975?
if i change a or b to float it gives .975, why?
Known is handfull, Unknown is worldfull