Lecture 45
Array
Code:
#include <iostream>
#include <conio.h>
using namespace std;
main ()
{
int num[4],
sum; //declaration
num[0]=52;
//Initialization
num[1]=63;
sum=num[0]+num[1];
cout<<"First number : "<<num[0];
cout<<"\nSecond number : "<<num[1];
cout<<"\nSum : "<<sum;
cout<<"\nMultiply : "<<num[0]*num[1];
getch();
return 0;
}
Code view in dev compiler:
Compile the program Ctrl+F9
Run program Ctrl+F10