Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
My Basket
You have nothing in your shopping cart yet.
Title: Computer science All programmes
Description: it contains all programmes for class 11
from beginning to end
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
COMPUTER SCIENCE
All Programmes
THIS PDF CONTAINS ALL PROGRAMMS OF C++ ( CLASS 11 )
1
...
#include
...
2
...
#include
...
Program to find square of a number
...
h>
void main()
{
int num1,square;
cout<<"Enter number: ";
cin>>num1;
square=num1*num1;
cout<<"Square of number is: "<}
OUTPUT
Enter number:
5
Square of number is: 25
4
...
#include
...
h>
void main()
{
clrscr();
int num1,num2;
cout<<"Enter value for num 1: ”;
cin>>num1;
cout<<"Enter value for num 2: ";
cin>>num2;
if(num1>num2)
cout<<"Num1 is greater than num 2";
else
cout<<"Num1 is smaller than num 2";
}
OUTPUT
Enter value for num 1: 5
Enter value for num 2: 10
Num1 is smaller than num 2
5
...
#include
...
33333333
6
...
#include
...
Program that reads radius of a circle and prints its area
...
h>
void main()
{
float radius,area;
cout<<"Enter Radius of circle:
";
cin>>radius;
area=radius*3
...
44
8
...
#include
...
h>
void main()
{
clrscr();
int x,y,z;
cout<<"Enter x: ";
cin>>x;
y=2*x;
z=2*x-1;
cout<<" Y = "<cin>>totaldays;
years=totaldays/365;
rem1=totaldays%365;
weeks=rem1/7;
rem2=rem1%7;
days=rem2;
cout<<"Years = "<}
OUTPUT
Enter total number of days : 956
Years = 2
weeks = 32
days = 2
10
...
#include
...
h>
void main()
{
clrscr();
int a, b, c;
cout<<"Enter a : ";
cin>>a;
cout<<"Enter b : ";
cin>>b;
c=a;
a=b;
b=c;
cout<<"\na= "<}
OUTPUT
Enter a: 5
Enter b: 7
a= 7
b= 5
11
...
#include
...
h>
void main()
{
clrscr();
int a,b;
cout<<"Enter a : ";
cin>>a;
cout<<"Enter b : ";
cin>>b;
a=a+b;
b=a-b;
a=a-b;
cout<<"Values after swapping: "<<"\na= "<}
OUTPUT
Enter a: 4
Enter b: 9
Values after swapping:
a= 9
b= 4
12
...
#include
...
Program to check whether the entered number is odd
or even
...
h>
#include
...
Program to find Simple Interest and Compound
Interest
...
h>
#include
...
Program to find area of a triangle
...
h>
#include
...
Program that seeds the name of user and number
of unit and displays the electricity charge with name
...
#include
...
h>
#include
...
Program to enter marks in five subjects and
calculate percentage
...
Percentage
Grade
>90
A
<= 90 and>81
B
<= 80 and>71
C
<= 70 and>61
D
<= 60 and>51
E
<= 50 and>41
F
<=40
Fail
#include
...
h>
#include
...
Program that accepts a character between A and J and
prints next 4 characters
...
h>
#include
...
Program to input a student type (‘A’ or ‘B’), and for
‘A’ initialize the collage account with Rs 200 otherwise
initialize the hostel account with Rs 200
...
h>
void main()
{
char stu_type;
int coll_acc,hostel_acc;
cout<<"Enter student type: ";
cin>>stu_type;
if(stu_type=='A')
coll_acc=200;
cout<<“\nCollage account:”<if(stu_type=='B')
hostel_acc=200;
cout<<“\nHostel account:”<}
OUTPUT
Enter student type: A
Collage account: 200
20
...
h>
void main()
{
char choice;
int radius, area, peri;
cout<<"Enter radius of circle: ";
cin>>radius;
cout<<"Enter 1 for area or 2 for perimeter: ";
cin>>choice;
area=22*radius*radius/7;
peri=2*22*radius/7;
if(choice=='1')
cout<<"Area: "<else
cout<<"Perimeter: "<}
OUTPUT
Enter radius of circle: 7
Enter 1 for area or 2 for perimeter: 1
Area: 154
21
...
The
value of w, x, y, z are entered by user
...
h>
void main()
{
float w, x, y, z, P;
cout<<"Enter numbers w, x, y, z";
cin>>w>>x>>y>>z;
P= (w + x)/(y-z);
cout<<"\nP = (w + x)/(y-z) =
}
OUTPUT
Enter numbers w, x, y, z
5
7
6
3
P = (w + x)/(y-z) = 4
"<
22
...
#include
...
h>
#include