AD4BP

Program:-16

Program:-16

Aim:-Write program for enter marks of five subject & find class of given percentage.
Input:-
#include< stdio.h >
#include< conio.h >

void main( )
{
int a,b,c,d,m,y;
clrscr( );

printf("Enter days=");
scanf("%d",&a);

y=a/365;
b=a%365;
m=b/30;
c=b%30;
d=c;

printf("\nYears:%d",y);
printf("\nMonths:%d",m);
printf("\nDays:%d",d);

getch( );
}
Output:-

Program:-15

Program:-15

Aim:-Write program for enter marks of five subject & find class of given percentage.
Input:-
#include< stdio.h >
#include< conio.h >
void main( )
{
int a,b,c,d,e;
float p;
clrscr( );

printf("Enter marks of Maths:");
scanf("%d",&a);

printf("Enter marks of Phy:");
scanf("%d",&b);

printf("Enter marks of Che:");
scanf("%d",&c);

printf("Enter marks of English:");
scanf("%d",&d);

printf("Enter marks of Computer:");
scanf("%d",&e);

p=(a+b+c+d+e)*100/500;

printf("Percentage: %5.2f%\n",p);

if(p<=100 &&p>=70)
{
printf("Destiction");
printf("\nCongratulation");
}
else if(p<70 &&p>=60)
{
printf("First class");
printf("\nCongratulation");
}

else if(p<60 &&p>=50)
{
printf("Second class");
printf("\nCongratulation");
}

else if(p<50 &&p>=35)
{
printf("Third class");
printf("\nCongratulation");
}

else if(p<35)
{
printf("Fail");
}

else
{
printf("Check your Entery");
}

printf("\nThank you \n Bye");
getch( );
}
Output:-

Write program for print college Address.

Input:-
#include < stdio.h >
#include < conio.h >
void main( )
{
clrscr( );
printf("\n\t\t\tWelcome");
printf("\n\t\t\t To");
printf("\n\t\t\tIndus Institute of Technology");
printf("\n\t\t\tRancharada, Ahmedabad");
getch( );
}


Output:-
Welcome
To
Indus Institute of Technology
Rancharada, Ahmedabad