18 Nov 2019

  • November 18, 2019
  • Amitraj
 C++ program to find area using constants and defines

#include<iostream>
using namespace std;
#define length 13
#define width 20
       const int len = 13;
       const int wid = 20;
  
 
  int main()
 {
     cout<<"\n Area using #define : " << length * width;
     cout<<"\n Area using constants : "<< len * wid;
 return 0;
 }

OUTPUT:

 Area using #define : 260
 Area using constants : 260



Translate

Popular Posts