(Move to ...)
▼
Program for illustration of Type Conversions
#include<iostream.h>
int main( )
{
int n = 22;
float x = 3.14159;
x= x+ n; // the value 22 is automatically converted to 22.0
cout << x - 2 ; // the value 2 is automatically converted to 2.0
return 0;
}
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment