DEV Community

C++
C++

Posted on

Variable in C++

include

using namespace std;

int main()
{
char examGrade = 'a';
int myRollNumber = 139;
float gravitational_acceleration_on_earth = 9.8; // meter per second
double gravitational_acceleration_on_other_planet = 0.0058;
bool is_cpp_faster_oop_language = true;

cout << "Exam Grade : " << examGrade << endl;
cout << "My Rollnumber : " << myRollNumber << endl;
cout << "Gravitational Acceleration on Earth : " << gravitational_acceleration_on_earth << " Meter per Second" << endl;
cout << "Gravitational Acceleration On Other Planet : " << gravitational_acceleration_on_other_planet << " meter Per Second" << endl;
cout << "is C++ Faster Object Oriented Language ? " << is_cpp_faster_oop_language << endl;
return 0;
Enter fullscreen mode Exit fullscreen mode

}

Top comments (0)