KK HTML
KK HTML
PPA PRACTICAL
Branch/Year-BCA/2nd
SECTION:- A
Submitted To: Submitted By:
{
int a=10,b=20;
printf("a+b=%d",a+b);
printf("a-b=%d",a-b);
printf("a*b=%d",a*b);
printf("a/b=%d",a/b);
printf("a%b=%d",a%b);
getch();
clrscr();
a=3;
b=10;
c=a*b;
d=c;
printf("\n a=%d,b=%d,c=%d,c=%d",a,b,c,d);
getch();
clrscr();
}
getch();
clrscr();}
programme 8:-(increment)
#include<stdio.h>
#include<conio.h>
void main()
{
int a=5,b,c,d;
b=++a;
c=a++;
d=++a;
printf("%d",a);
getch();
clrscr();
8
Programme 9:-(decrement)
#include<stdio.h>
#include<conio.h>
void main()
{
int a=5,b,c,d;
b=--a;
c=a--;
d=--a;
printf("%d",a);
getch();
clrscr();
}
9
#include<stdio.h>
#include<conio.h>
void main()
{
int a=16,b=6;
printf("%d\n",(a<b)&&(a>b));
printf("%d\n",(a<b)||(a>b));
printf("%d\n",!(a==b));
getch();
clrscr();
}
10
#include<stdio.h>
#include<conio.h>
void main()
{
int a=90,b=30,sub;
sub=a-b;
printf("the sub of a and b is %d ",sub);
getch();
clrscr():; }
12
scanf("%d",&a);
printf("Enter the value of b");
scanf("%d",&b);
sum=a+b;
sub=a-b;
mul=a*b;
div=a/b;
printf("the value of sum is %d",sum);
printf("the value of sub is %d",sub);
printf("the value of mul is %d",mul);
printf("the value of div is %d",div);
getch();
clrscr();
}
int math,science,computer,ppa,bc,sum;
printf("Enter the value of math");
scanf("%d",&math);
printf("Enter the value of science");
scanf("%d",&science);
printf("Enter the value of computer");
scanf("%d",&computer);
printf("Enter the value of ppa");
scanf("%d",&ppa);
printf("Enter the value of bc");
scanf("%d",&bc);
sum= math+science+bc+ppa+computer;
printf("the value of sum is %d",sum);
getch();
clrscr();
}
16
#include<stdio.h>
#include<conio.h>
void main()
{
int a,area;
printf("enter the value of a");
scanf("%d",&a);
area= a*a;
printf("the are of square is %d",area);
getch();
clrscr();
}
getch();
clrscr();
}
Programme 23:-