C++: To insert and display values in a two dimensional array

#include<iostream.h>
#include<conio.h>
#define WIDTH 5
#define HEIGHT 2
void main()
{
int a[HEIGHT][WIDTH];
int n, m;
clrscr();
for(n=0; n<HEIGHT; n++)
{
for(m=0; m<WIDTH; m++)
cin>>a[n][m];
}
cout<<endl<<endl;
for(n=0; n<HEIGHT; n++)
{
for(m=0; m<WIDTH; m++)
cout<<a[n][m]<<endl;
}
getch();
}

C++: Grade Calculation

Execute the following code below?
#include<iostream.h>
#include<conio.h>
void main()
{
int eng, math, dhiv, islam, sci, tot;
float avg;
char grade;
clrscr();
cout<<endl<<"ENTER MARKS"<<endl<<endl<<"English: "<<endl;
cin>> eng;
cout<<"Mathematics: "<<endl;
cin>>math;
cout<<"Dhivehi: "<<endl;
cin>>dhiv;
cout<<"Islam: "<<endl;
cin>>islam;
cout<<"Science: "<<endl;
cin>>sci;
tot = eng+math+dhiv+islam+sci;
avg = tot/5;
cout<<endl<<"Total Marks = "<<tot<<endl;
cout<<endl<<"Average Marks = "<<avg<<endl;
if (avg>=75)
grade = 'A';
else if (avg>=65 && avg<=74)
grade = 'B';
else if (avg>=50 && avg<=64)
grade = 'C';
else if (avg>=40 && avg<=49)
grade = 'D';
else
grade = 'F';
cout<<endl<<"Grade = "<<grade;
getch();
}

Check an alphabet whether it is a vowel or not – C++

Check below code in c++ to check an alphabet whether it is a vowel or not in c++
#include<iostream.h>
#include<conio.h>
void main()
{
char c;
clrscr();
cout<<"Enter a character"<<endl;
cin>> c;
if (c=='A' || c=='a' || c=='E' || c=='e' || c=='I' || c=='i' || c=='O' || c=='o' || c=='U' || c=='u')
cout<<endl<<c << " is a vowel";
else
cout<<endl<<c << " is not a vowel";
getch();
}

Finding the area and perimeter of a rectangle

#include<iostream.h> #include<conio.h> void main() { int length, width; int perimeter, area; clrscr(); cout<< "Length = "; cin>> length; cout<< "Width = "; cin>> width; perimeter = 2*(length+width); area = length*width; cout<<endl<< "Perimeter is "<<perimeter; cout<<endl<< "Area is "<<area; getch(); }

Finding the area of a circle in c++

#include<iostream.h>
#include<conio.h>
#define PI 3.14159
#define NEWLINE '\n'
void main()
{
float r, area;
clrscr();
cout<<NEWLINE<<"Enter the radius of circle: ";
cin>>r;
area = 2*PI*r;
cout<<NEWLINE<<"Area of circle is: "<<area;
getch();
}