Professional Documents
Culture Documents
Index
Program Status:
1
OUTPUT:
25-E,Bharathiyar Nagar
m.c Road,thanjavur
Pincode:613004.
2
LAB TASK:01
DATE:12.02.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
clrscr();
printf(“25-E,Bharathiyar Nagar\n”);
printf(“m.c Road,thanjavur\n”);
printf(“Pincode:613004\n”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
3
OUTPUT:
4
LAB TASK:02
DATE:21.01.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int a,b,c,sum;
clrcsr();
scanf(“%d”,&a);
scanf(“%d”,&b);
scanf(“%d”,&c);
sum=a+b+c;
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
5
OUTPUT:
6
LAB TASK:03
DATE:10.02.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int n,result;
clrscr();
scanf(“%d”,&n);
result=n x (n+1)/2;
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
7
OUTUT:
8
LAB TASK:04
DATE:10.02.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
float pi=3.14;
int rad;
float result;
clrscr();
scanf(“%d”,&rad);
result=pi*rad*rad;
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
9
OUTPUT:
MULTILICATION TABLE
1x8=8
2x8=16
3x8=24
4x8=32
5x8=40
6x8=48
7x8=56
8x8=64
9x8=72
10x8=80
10
LAB TASK:05
DATE:03.03.15
AIM:
CODING:
#include<stdiuo.h>
#include<conio.h>
void main()
int i;
clrscr();
printf(“Multilication Table\n”);
for(i=1;i<=10;i++)
printf(“%d*%d=%d”,I,8,i*8);
printf(“\n”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
11
OUTPUT:
EVEN NUMBER
10
12
LAB TASK:06
DATE:03.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int i;
clrscr();
printf(“Even Number\n”);
for(i=1;i<=20;i++)
if(i%2==0)
printf(“%d”,i);
printf(“\n”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
13
OUTPUT:
ODD NUMBER
11
13
15
17
19
14
LAB TASK:07
DATE:03.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int i;
clrscr();
printf(“odd Number\n”);
for(i=1;i<=20;i++)
if(i%2!=0)
printf(“%d”,i);
printf(“\n”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
15
OUTUT:
FAIL
16
LAB TASK:08
DATE:04.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int mark;
clrscr();
scanf(“%d”,&mark);
if(mark>=35)
clrscr();
printf(“pass”);
else
printf(“fail”);
getch();
17
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
18
OUTPUT:
60
70
80
90
50
FIRST CLASS
19
LAB TASK:09
DATE:04.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int m1,m2,m3,m4,m5,total;
float average;
clrscr();
scanf(“%d%d%d%d%d”,&m1,&m2,&m3,&m4,&m5);
total= m1+m2+m3+m4+m5;
average=total/5.0;
if(average>=90)
printf(“Distinction”);
printf(“first class”);
else
20
Printf(“no grade”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
21
OUTPUT:
22
LAB TASK:10
DATE:4.3.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int i;
clrscr();
scanf(“%d”,&i);
if(i>=0)
else
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
23
OUTPUT:
85
98
75
65
First class
24
LAB TASK:11
DATE:17.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int m1,m2,m3,m4,m5,total;
float average;
clrscr();
scanf(“%d%d%d%d%d”,&m1,&m2,&m3,&m4,&m5);
total= m1+m2+m3+m4+m5;
average=total/5.0;
if(m1>=35&&m2>=35&&m3>=35&&m4>=35&&m5>=35)
if(average>=90&&<=100)
printf(“Distinction”);
printf(“first class”);
else if(average>=60&&average<=69)
printf(“second class”);
else
printf(“third clasds”);
25
}
else
printf(“no grade”);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
26
OUTPUT:
ENTER A DIGIT:146
SUM OF DIGIT=11
27
LAB TASK:12
DATE:17.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
int n,sum=0,k;
clrscr();
printf(“Enter digit”);
scanf(“%d,”&n);
while(n>0)
k=n%10;
sum=sum+k
n=n/10;
getch();
28
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
29
OUTPUT:
Sum of a&b:23
Sub of a&b:7
mul of a&b:120
div of a&b:1
30
LAB TASK:13
DATE :24.03.15
AIM:
CODING:
#include<stdio.h>
#include<conio.h>
void main()
do
clrscr();
scanf(“%d%d,&a,&b);
c=a+b;
d=a-b;
e=a*b;
f=a/b;
scanf(“%s”,&choice);
31
while (choice==’y’);
getch();
RESULT:
Thus the program satisfies the aim of the task and executed successfully.
32