The document contains code snippets in C++. The snippets demonstrate basic C++ programs that calculate area and circumference of a circle, perimeter and area of a rectangle, average of marks, printing text, functions to check even and odd numbers in an array, functions to return the larger of two numbers, and a function to print a line of a character.
1 of 7
Download to read offline
More Related Content
Cpp c++ 2
2. #include<iostream.h>
void main ()
{
int sum=0;
for(int i=0; i<=50; i++)
{
sum+=i;
}
cout<<sum<<endl;
}
1275
#include<iostream.h>
void main ()
{
int x;
char n;
cin>>n;
x=n;
cout<<x;
}
A=65