Professional Documents
Culture Documents
191-049-801, ARAFAT, CSE2102, Lab Report PDF
191-049-801, ARAFAT, CSE2102, Lab Report PDF
191-049-801, ARAFAT, CSE2102, Lab Report PDF
Programming Techniques
Course Code: CSE2102
Programming Language
#include <stdio.h>
int main()
printf("Hello");
return 0;
2nd Code:
#include <stdio.h>
int main()
int l=10;
int w=5;
int A;
A=l*w;
return 0;
3rd Code:
#include <stdio.h>
int main()
float l=2.5;
float w=1.5;
float h=0.5;
float A;
float V;
A=l*w;
V=l*w*h;
return 0;
4th Code:
#include <stdio.h>
int main()
float l=10;
float w=5;
float A;
A=l*w;
return 0;
5th Code:
#include <stdio.h>
int main()
return 0;
}
6th Code
#include <stdio.h>
int main ()
int l,w;
scanf("%d", & l );
scanf("%d",& w);
int A;
A=l*w;
return 0;
7th Code:
#include <stdio.h>
int main()
float Far;
scanf("%f",&Far);
float Cen;
Cen=((Far-32)/9)*5;
printf("Centigrade= %f",Cen);
return 0;
}
8th Code
#include <stdio.h>
int main()
int d,c,y,n,p;+
float dr;
scanf("%d",&d);
scanf("%d",&c);
scanf("%d",&y);
scanf("%d",&n);
scanf("%d",&p);
dr=((840000*d*c)/(454*y*n*p))*100;
return 0;
}
9th Code:
#include <stdio.h>
int main()
int a;
scanf("%d",&a);
if(a>20)
printf("Yes");
else
printf("No");
return 0;
10th Code:
include <stdio.h>
int main()
float w,m,v;
scanf("%f",&w);
scanf("%f",&m);
printf("Enter the volume of the solution: ");
scanf("%f",&v);
mc=(w/m)*(1000/v);
return 0;
11th Code
#include <stdio.h>
int main ()
float ph;
printf("Enter ph:");
scanf("%f",&ph);
if(ph>7)
printf("Base");
else
printf("Acid");
return 0; }
12th Code
#include <stdio.h>
int main()
float ph;
scanf("%f",&ph);
if(ph>7)
printf("Base");
else if(ph==7)
printf("Neutral");
else
printf("Acid");
return 0; }
13th Code:
#include <stdio.h>
int main()
float cs;
scanf("%f",&cs);
if(cs==14.5)
printf("XS");
else if(cs==15.2)
printf("S");
else if(cs==15.9)
printf("M");
else if(cs==16.7)
printf("L");
else if(cs==17.5)
printf("XL");
else if(cs==18.3)
printf("XXL");
else if(cs==19.5)
printf("XXXL");
}
else
printf("Invalid Size");
return 0;
14th Code:
#include <stdio.h>
int main()
int n;
scanf("%d",&n);
if(n%2==0)
else
return 0;
}
15th Code :
#include <stdio.h>
int main()
int n,a,r1,b,r2,c;
scanf("%d",&n);//n=326
a=n%10;//a=6
r1=n/10;//r1=32
b=r1%10;//b=2
r2=r1/10;//r2=3
c=r2%10;
return 0;
16th Code :
#include <stdio.h>
int main()
int id,batch;
scanf("%d",&id);
batch=id/10000000;
if(batch==15)
printf("15 Batch");
else if(batch==16)
{
printf("16 Batch");
else if(batch==17)
printf("17 Batch");
else if(batch==18)
printf("18 Batch");
else if(batch==19)
printf("19 Batch");
else
printf("Invalid");
return 0;
17th Code :
#include <stdio.h>
int main()
int i;
{
printf("i am reapting \n");
return 0;
18th Code :
#include <stdio.h>
int main()
int i;
return 0;
19th Code :
#include <stdio.h>
int main()
int i;
int sum=0;
sum= sum+i;
}
return 0;
20th Code :
#include <stdio.h>
int main()
int n;
scanf("%d",&n);
if (n%2==0)
else
return 0;
}
21th Code :
#include <stdio.h>
int main()
{ int id;
scanf("%d",&id);
int batch;
batch=id/10000000;
printf("This is %d batch",batch);
return 0;