/* program to first,second third class*/ #include void main() { float ma; printf("\n Enter a marks:"); scanf("%f",&ma); if(ma>=60) { printf("\n You get first class\n"); } else if(ma>=50) { printf("\n you get second class\n"); } else if(ma>=40) { printf("\n You get third class\n");
#include void main() { float a; printf(" \n Enter your percentage="); scanf("%f",&a); printf("\n Your percentage is %f and ",a); if(a>65) { printf("CONGRATULATION YOU GOT AN DISTINGSTION. \n"); } else if(a>60) { printf("CONGRATULATION YOU GOT AN 1ST CLASS. \n"); } else if (a>50) { printf("CONGRATULATION YOU GOT AN 2ND CLASS. \n"); } else if(a>40) { printf("CONGRATULATION YOU ARE PASS. \n"); } else { printf("SORRY you are fail. Try in next time. \n"); } }
//check your class #include void main() { int sub1,sub2,sub3,sub4,sub5; float per; printf("enter marks of each sub"); scanf("%d%d%d%d%d",&sub1,&sub2,&sub3,&sub4,&sub5); per=(sub1+sub2+sub3+sub4+sub5)/5; printf("your percentage=%f",per); if(per>60) { printf("Congrats you got 1st class\n"); } else if(per>50) { printf("Congrats you got 2nd class\n"); } else if(per>=40) { printf("Congrats you are pass\n"); } else { printf("Sorry you are fail\n"); } }
#include
ReplyDeletevoid main()
{
float per;
printf("\nEnter Percentage\n");
scanf("%f",&per);
if(per>=75)
printf("\nYou got disingtion\n");
else if(per>=60)
printf("\nYou got First class\n");
else if(per>=50)
printf("\nYou got Second class\n");
else if(per>=40)
printf("\nYou got Third class\n");
else
printf("\nYou are fail\n");
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\tEnter a Percentage");
scanf("%f",&per);
if(per>=70)
{
printf("\n\tYou got Distinction");
}
else if(per>=60)
{
printf("\n\tYou got First class");
}
else if(per>=50)
{
printf("\n\tYou got Second class");
}
else if(per>=40)
{
printf("\n\tYou got Third class");
}
else
{
printf("\n\tFail");
}
}
/* program to first,second third class*/
ReplyDelete#include
void main()
{
float ma;
printf("\n Enter a marks:");
scanf("%f",&ma);
if(ma>=60)
{
printf("\n You get first class\n");
}
else if(ma>=50)
{
printf("\n you get second class\n");
}
else if(ma>=40)
{
printf("\n You get third class\n");
}
else
{
printf("\n You are fail");
}
}
//vowel or consonant
ReplyDelete#include
void main()
{
char ch;
printf("\nenter the character");
scanf("%c",&ch);
if(ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u')
{
printf("\nvowel");
}
else
{
printf("\nconsonant");
}
}
#include
ReplyDeletevoid main()
{
int cg,java,c,m1,m2,m3;
float per,total;
printf("Enter a marks of subject:\n");
printf("\nCg\tjava\tc\tm1\tm2\tm3\n");
scanf("%d %d %d %d %d %d",&cg,&java,&c,&m1,&m2,&m3);
total=cg+java+c+m1+m2+m3;
printf("\n\tToatal marks=%f",total);
per= total/6*100;
printf("\n\tPercentage=%f",per );
if(per>=70)
{
printf("\n\tYou got Distinction");
}
else if(per>=60)
{
printf("\n\tYou got first class");
}
else if(per>=50)
{
printf("\n\tYou got second class");
}
else if(per>=40)
{
printf("\n\tYou are pass");
}
else
{
printf("\n\tYou are Fail");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\tEnter a Percentage");
scanf("%f",&per);
if(per>=70)
{
printf("\n\tYou got Distinction");
}
else if(per>=60)
{
printf("\n\tYou got First class");
}
else if(per>=50)
{
printf("\n\tYou got Second class");
}
else if(per>=40)
{
printf("\n\tYou got Third class");
}
else
{
printf("\n\tFail");
}
}
#include
ReplyDeletevoid main()
{
int i,num,cnt1,cnt2,cnt3;
for(i=1;i<=5;i++)
printf("\n\t Enter the numbers");
scanf("%d",&num);
if(num>=0)
cnt1++;
if(num<=0)
cnt2++;
if(num==0)
cnt3++;
printf("Total positive numbers=");
printf("Total negative numbers=");
printf("Total zero numbers=");
}
#include
ReplyDeletevoid main()
{
float marks;
printf("enter the marks of 5 subjects:");
scanf("%f",&num);
if(marks>=65)
{
printf("first class");
}
else if(marks>=50)
{
printf("second class");
}
else if(marks>=45)
{
printf("third class");
}
else
{
printf("fail");
}
}
/*To check which class is got by using if else if ladder,13-july-2016*/
ReplyDelete#include
void main()
{
float percentage;
printf("\n\tEnter ur choice");
scanf("%f",&percentage);
if(percentage>60)
{
printf("First class");
}
else if(percentage>50)
{
printf("Second class");
}
else if(percentage>40)
{
printf("Third class");
}
else
{
printf("Fail");
}
}
Buddy it is correct!!!
ReplyDelete//check your class
#include
void main()
{
int a,b,c,d,e; //5 subjects
float pcg; //percentage actually average
printf("\n\tEnter the marks for 5 subjects:");
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
pcg=(a+b+c+d+e)/5;
printf("\n\tPercentage=%f",pcg);
if(pcg<40)
printf("\n\tFAIL");
else if(pcg=40 && pcg<60)
printf("\n\tPASS CLASS");
else if(pcg=60 && pcg<66)
printf("\n\tFIRST CLASS");
else if(pcg=66 && pcg<77)
printf("\n\tDISTINCTION");
else if(pcg=77 && pcg<=100)
printf("\n\tHIGHER DISTINCTION");
}
#include
ReplyDeletevoid main()
{
float per;
printf("enter per");
scanf("%f",&per);
if(per>=60)
{
printf("first class");
}
else if(per>=50)
{
printf("second class");
}
else if(per>=40)
{
printf("third class");
}
else
{
printf("fail");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("enter the percentage");
scanf("%f",&per);
if(per>=70)
{
printf("\ndistinction");
}
else if(per>=60)
{
printf("\nfirst class");
}
else if(per>=50)
{
printf("\nsecond class");
}
else if(per>=40)
{
printf("\nthird class");
}
else("you will fail");
}
#include
ReplyDeletevoid main()
{
int m1,m2,m3,m4,m5;
float avg;
printf("\n enter the marks of 3 subjests=");
scanf("%d%d%d%d%d",&m1,&m2,&m3,&m4,&m5);
avg=(m1+m2+m3+m4+m5)/5;
printf("\n avreage=%f",avg);
if(avg<=60 && avg<66)
{
printf("\n first class");
}
if(avg<60 && avg>50)
{
printf("\n second class");
}
if(avg>=66)
{
printf("\n distinction");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\tenter percentage");
scanf("%f",&per);
if(per>70)
printf("distinction");
else if(per>60)
printf("first class");
else if(per>50)
printf("second class");
else if(per>40)
printf("third class");
else
printf("fail");
}
#include
ReplyDeletevoid main()
{
float per;
printf("\nEnter Percentage\n");
scanf("%f",&per);
if(per>=75)
printf("\nYou got disingtion\n");
else if(per>=60)
printf("\nYou got First class\n");
else if(per>=50)
printf("\nYou got Second class\n");
else if(per>=40)
printf("\nYou got Third class\n");
else
printf("\nYou are fail\n");
}
//if else if ladder
ReplyDelete#include
void main()
{
float per;
printf("\nenter your percentage");
scanf("%f",&per);
if(per>=60)
{
printf("\n1st class");
}
else if(per>=50)
{
printf("\n2nd class");
}
else if(per>=40)
{
printf("\n3rd class");
}
else
{
printf("\nfail");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\t enter your percentage");
scanf("%f",&per);
if(per>=60)
{
printf("\n\t first class");
}
elseif(per>=50)
{
printf("\n\t second class");
}
elseif(per>=40)
{
printf("\n\t third class");
}
else
{
printf("\n\t fail");
}
}
include
ReplyDeletevoid main()
{
float per;
printf("\nEnter Percentage\n");
scanf("%f",&per);
if(per>=75)
printf("\nYou got disingtion\n");
else if(per>=60)
printf("\nYou got First class\n");
else if(per>=50)
printf("\nYou got Second class\n");
else if(per>=40)
printf("\nYou got Third class\n");
else
printf("\nYou are fail\n");
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\t Enter your marks=");
scanf("%f",&per);
if(per>=60)
{
printf("\n\t You got first class ");
}
else if(per>=50)
{
printf("\n\t You got second class ");
}
else if(per>=40)
{
printf("\n\t You got Third class ");
}
else
{
printf("\n\t You are fail");
}
}
#include
ReplyDeletevoid main()
{
int s1,s2,s3,s4,s5;
float per,total;
printf("Enter a marks of five subject:\n");
scanf("%d%d%d%d%d",&s1,&s2,&s3,&s4,&s5);
total=s1+s2+s3+s4+s5;
printf("\n\tToatal marks=%f",total);
per= (total*100)/500;
printf("\n\tPercentage=%f",per );
if(per>=70)
{
printf("\n\tYou got Distinction");
}
else if(per>=60)
{
printf("\n\tYou got first class");
}
else if(per>=50)
{
printf("\n\tYou got second class");
}
else if(per>=40)
{
printf("\n\tYou are pass");
}
else
{
printf("\n\tYou are Fail");
}
}
/* Program to determine grade of student marks*/
ReplyDelete#include
void main()
{
int cg,java,c,m1,m2,m3;
float per,total;
printf("Enter a marks of subject:\n");
printf("\nCg\tjava\tc\tm1\tm2\tm3\n");
scanf("%d %d %d %d %d %d",&cg,&java,&c,&m1,&m2,&m3);
total=cg+java+c+m1+m2+m3;
printf("\n\tToatal marks=%f",total);
per= total/6*100;
printf("\n\tPercentage=%f",per );
if(per>=70)
{
printf("\n\tYou got Distinction");
}
else if(per>=60)
{
printf("\n\tYou got first class");
}
else if(per>=50)
{
printf("\n\tYou got second class");
}
else if(per>=40)
{
printf("\n\tYou are pass");
}
else
{
printf("\n\tYou are Fail");
}
}
#include
ReplyDeletevoid main()
{
int per;
printf("\nEnter a number=");
scanf("%d",&per);
if(per>=75)
{
printf("\n Distingstion.\n");
}
else if(per>=60)
{
printf("\n First class\n");
}
else if(per>=50)
{
printf("\n Second class\n");
}
else if(per>=40)
{
printf("\n Third class\n");
}
else
{
printf("\n Fail.\n");
}
}
#include
ReplyDeletevoid main()
{
int a,b,c,d,e,total;
float avg;
printf("\n enter the marks of five subjests=");
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
total=a+b+c+d+e;
avg=total/3;
printf("\n avreage=%f",avg);
if(avg>66)
{
printf("\n DISTINCTION");
}
elseif(avg>60)
{
printf("\n FIRST CLASS");
}
elseif(avg>40)
{
printf("\n PASS");
}
else
{
printf(" FAIL")
}
#include
ReplyDeletevoid main()
{
float p;
printf("\n\tEnter a percentage");
scanf("%f",&p);
if(p>=60)
{
printf("\n\t First class");
}
else if(p>=50)
{
printf("\n\t Second class");
}
else if(p>=40)
{
printf("\n\t Third class");
}
else
{
printf("\n\t Fail");
}
}
/*determin the class*/
ReplyDelete#include
void main()
{
float per;
if(per<40)
{printf("fail");
}
else if(per>=60)
{
printf("\n\t you get first class");
}
else if (per>=50)
{
printf("\n\t you get second class");
}
else if(per>=40)
{printf("\n\t get third class");
}
else
{printf("\n\t enter correct per");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\t enter the percentage");
scanf("%f",&per);
if(per>=66)
{
printf("\n\t distincation");
}
else if(per>=60)
{
printf("\n\t first class");
}
else if(per>=50)
{
printf("\n\t second class");
}
else if(per>=40)
{
printf("\n\t therd class");
}
else
{
printf("\n\t fail");
}
}
#include
ReplyDeletevoid main()
{
float a;
printf(" \n Enter your percentage=");
scanf("%f",&a);
printf("\n Your percentage is %f and ",a);
if(a>65)
{ printf("CONGRATULATION YOU GOT AN DISTINGSTION. \n");
}
else if(a>60)
{ printf("CONGRATULATION YOU GOT AN 1ST CLASS. \n");
}
else if (a>50)
{ printf("CONGRATULATION YOU GOT AN 2ND CLASS. \n");
}
else if(a>40)
{ printf("CONGRATULATION YOU ARE PASS. \n");
}
else
{ printf("SORRY you are fail. Try in next time. \n");
}
}
//check your class
ReplyDelete#include
void main()
{
int sub1,sub2,sub3,sub4,sub5;
float per;
printf("enter marks of each sub");
scanf("%d%d%d%d%d",&sub1,&sub2,&sub3,&sub4,&sub5);
per=(sub1+sub2+sub3+sub4+sub5)/5;
printf("your percentage=%f",per);
if(per>60)
{
printf("Congrats you got 1st class\n");
}
else if(per>50)
{
printf("Congrats you got 2nd class\n");
}
else if(per>=40)
{
printf("Congrats you are pass\n");
}
else
{
printf("Sorry you are fail\n");
}
}
#include
ReplyDeletevoid main()
{
float mark;
printf("enter the mark");
scanf("%f",&mark);
if(mark>=60)
{
printf("first class");
}
else if(mark>=50)
{
printf("second class");
}
else if(mark>=40)
{
printf("third class");
}
else
{
printf("fail");
}
}
#include
ReplyDeletevoid main()
{
float mark;
printf("\nEnter the marks");
scanf("\n%f",&mark);
if(mark>=76)
{
printf("\nFigher Distinction");
}
else if(mark>=65)
{
printf("\nDistinction");
}
else if(mark>=60)
{
printf("\nFirst Class");
}
else if(mark>=50)
{
printf("\nSecond Class");
}
else if(mark>=40)
{
printf("\nThird Class");
}
else
{
printf("Fail");
}
}
#include
ReplyDeletevoid main()
{
float mark;
printf("enter the mark");
scanf("%f",&mark);
if(mark>=75)
{
printf("Distingtion");
}
else if(mark>=60)
{
printf("first class");
}
else if(mark>=50)
{
printf("second class");
}
else if(mark>=40)
{
printf("third class");
}
else
{
printf("fail");
}
}
#include
ReplyDeletevoid main()
{
float per;
printf("\n\tenter percentage");
scanf("%f",&per);
if(per>70)
printf("distinction");
else if(per>60)
printf("first class");
else if(per>50)
printf("second class");
else if(per>40)
printf("third class");
else
printf("fail");
}