- Syntax :
type variable = value;
- Program :
#include <iostream>
using namespace std;
int main() {
cout <<"\n----------------DECLARING VARIABLE----------------\n";
//The value is constant it can not be changed
const int minutesPerHour = 60;
const float PI = 3.14;
cout << minutesPerHour << "\n";
cout << PI;
return 0;
}
- Output :
No comments:
Post a Comment