#03_Variables and comments in C++
# include<iostream>
//variables and comments in C++
using namespace std;
//This is single line comment.
/*this is multiline comment
this is multiline comment*/
int main()
{
int a=5, b=10;
float PI=3.14;
char character='m';
bool boolean=false;
double accurate_PI=3.1412321232;
cout<< "The value of a is "<< a<< ". \nThe value of b is "<<b;
cout<<".\nThe value of PI is "<<PI;
cout<<"\nThe value of character is "<<character;
cout<<"\nThe value of boolean is "<<boolean;
cout<<"\nThe accurate value of PI is "<<accurate_PI;
cout<< "\n";
return 0;
}
Comments
Post a Comment