PPS LAB

Program to check whether a year is leap year or not in C

Program #include <stdio.h> int main() { int year; printf(“************************************************************”); printf(“\n************************************************************”); printf(“\n** WAP to check whether a year is leap year or not in C **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n************************************************************”); printf(“\n************************************************************”); printf(“\nenter the year\n”); scanf(“%d”, &year); if (year % 100 == 0) { if (year …

Program to check whether a year is leap year or not in C Read More »

Program to find maximum and minimum of three numbers in C

Program Logic 1 #include<stdio.h> int main() { int a,b,c,max,min; printf(“************************************************************”); printf(“\n************************************************************”); printf(“\n** WAP to find maximum and minimum of three numbers in C **”); printf(“\n** using if else if laddar **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n************************************************************”); printf(“\n************************************************************”); printf(“\nenter three numbers”); scanf(“%d%d%d”,&a,&b,&c); if(a>b && a>c) max=a; …

Program to find maximum and minimum of three numbers in C Read More »

Program to find maximum and minimum of two numbers in C

Program #include<stdio.h> int main() { int a,b,max,min ; printf(“*********************************************************”); printf(“\n*********************************************************”); printf(“\n** WAP to find maximum and minimum of two numbers in C **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n*********************************************************”); printf(“\n*********************************************************”); printf(“\nenter two numbers”); scanf(“%d%d”,&a,&b); if(a>b) max=a; else max=b; printf(“maximum is %d”,max); if(a<b) min=a; else min=b; printf(“\nminimum …

Program to find maximum and minimum of two numbers in C Read More »

Program to find curved and total surface area and volume of a cylinder in C

Program #include <stdio.h> int main() { float r, h, tsa, csa, v; printf(“******************************************************************”); printf(“\n******************************************************************”); printf(“\n** WAP to find curved & total surface area & volume of cylinder **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n******************************************************************”); printf(“\n******************************************************************”); printf(“\nenter radius and height of cylinder”); scanf(“%f%f”, &r, &h); tsa = …

Program to find curved and total surface area and volume of a cylinder in C Read More »

Progarm to find curved and total surface area and volume of a cone in C

Program #include <stdio.h> int main() { float r,h,l,tsa,csa,v; printf(“**************************************************************”); printf(“\n**************************************************************”); printf(“\n** WAP to find curved & total surface area & volume of cone **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************************”); printf(“\n**************************************************************”); printf(“\nenter radius and height and slant height of cone”); scanf(“%f%f%f”,&r,&h,&l); tsa=3.14*r*r+r*l; csa=3.14*r*l; v=3.14*.33*r*r*h; printf(“total surface …

Progarm to find curved and total surface area and volume of a cone in C Read More »

Progarm to find area and volume of a sphere in C

Program #include <stdio.h> int main() { float r,v,a; printf(“*************************************************”); printf(“\n*************************************************”); printf(“\n** WAP to find area and volume of a sphere **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n*************************************************”); printf(“\n*************************************************”); printf(“\nenter radius of sphere”); scanf(“%f”,&r); v= 1.33*3.14*r*r*r; a=4*3.14*r*r; printf(“area is : %f\n”,a); printf(“volume is : %f\n”,v); return 0; …

Progarm to find area and volume of a sphere in C Read More »

Program to find area and circumference of a circle in C

Program #include<stdio.h> int main() { float r,a,c; printf(“**********************************************************”); printf(“\n**********************************************************”); printf(“\n** WAP to find area and circumference of a circle **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**********************************************************”); printf(“\n**********************************************************”); printf(“\nenter the radius of circle \n “); scanf(“%f”,&r); a = 3.14*r*r; printf(“the area of circle is %f \n”,a); c …

Program to find area and circumference of a circle in C Read More »

Program to find area and perimeter of a triangle in C

Program #include<stdio.h> int main() { int base,h,area; printf(“*********************************************************”); printf(“\n*********************************************************”); printf(“\n** WAP to find area and perimeter of a triangle **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n*********************************************************”); printf(“\n*********************************************************”); printf(“\nenter the base of triangle \n “); scanf(“%d”,&base); printf(“enter the height of triangle \n “); scanf(“%d”,&h); area = (base*h) …

Program to find area and perimeter of a triangle in C Read More »

Progarm to find area and perimeter of a square in C

Program #include<stdio.h> int main() { int s,a,p; printf(“**************************************************”); printf(“\n**************************************************”); printf(“\n** WAP to find area and perimeter of a square **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n**************************************************”); printf(“\n**************************************************”); printf(“\nenter the side of square \n “); scanf(“%d”,&s); a = s*s; printf(“the area of square is %d \n”,a); p …

Progarm to find area and perimeter of a square in C Read More »

Program to find area and perimeter of a rectangle in C

Program #include<stdio.h> int main() { int l,b,a,p; printf(“****************************************************”); printf(“\n****************************************************”); printf(“\n** WAP to find area and perimeter of a rectangle **”); printf(“\n** Created by Sheetal Garg **”); printf(“\n** Assistant Professor **”); printf(“\n** Phone No:9467863365 **”); printf(“\n****************************************************”); printf(“\n****************************************************”); printf(“\nenter the length of rectangle \n “); scanf(“%d”,&l); printf(“enter the breadth of rectangle \n “); scanf(“%d”,&b); a = l*b; …

Program to find area and perimeter of a rectangle in C Read More »

error: You can only copy the programs code and output from this website. You are not allowed to copy anything else.