xxxxxxxxxx
#include<stdio.h>
main()
{
int grade;
printf("\nEnter Grade: ");
scanf("%d",&grade);
if(grade>=90&&grade<=100)
printf("\nGrade = A\n");
else if(grade>=80&&grade<=89)
printf("\nGrade = B\n");
else if(grade>=70&&grade<=79)
printf("\nGrade = C\n");
else if(grade>=60&&grade<=69)
printf("\nGrade = D\n");
else if(grade>=50&&grade<=59)
printf("\nGrade = E\n");
else printf("\nOUT OF RANGE!\n");
}
xxxxxxxxxx
//Write a program that display high school level of a student
//based on its year-entry
#include<stdio.h>
main()
{
int n;
printf("\nEnter student year-level number: ");
scanf("%d",&n);
if(n==1)
printf("\nHigh-school: Freshmen\n");
else if(n==2)
printf("\nHigh-school: Sophomore\n");
else if(n==3)
printf("\nHigh-school: Junior\n");
else if(n==4)
printf("\nHigh-school: Senior\n");
else printf("\nOUT OF SCHOOL!\n");
}
xxxxxxxxxx
//Write a program that accepts an input grade in percentile form
//and output its grade equivalent;
//based on the given range of percentile and grade the equivalent table below:
//Range: (1)75-76, (2)77-79, (3)80-81, (4)82-84, (5)85-88, (6)89-91, (7)92-94, (8)95-97, (9)98-100
//Grade: (1)3.00, (2)2.75, (3)2.50, (4)2.25, (5)2.00, (6)1.75, (7)1.50, (8)1.25, (9)1.00
#include<stdio.h>
main()
{
float rop;
printf("\nEnter your percentile grade: ");
scanf("%f",&rop);
if(rop>=75&&rop<=76)
printf("\nThe equivalent grade = 3.00\n");
else if(rop>=77&&rop<=79)
printf("\nThe equivalent grade = 2.75\n");
else if(rop>=80&&rop<=81)
printf("\nThe equivalent grade = 2.50\n");
else if(rop>=82&&rop<=84)
printf("\nThe equivalent grade = 2.25\n");
else if(rop>=85&&rop<=88)
printf("\nThe equivalent grade = 2.00\n");
else if(rop>=89&&rop<=91)
printf("\nThe equivalent grade = 1.75\n");
else if(rop>=92&&rop<=94)
printf("\nThe equivalent grade = 1.50\n");
else if(rop>=95&&rop<=97)
printf("\nThe equivalent grade = 1.25\n");
else if(rop>=98&&rop<=100)
printf("\nThe equivalent grade = 1.00\n");
else printf("\nOUT OF RANGE!\n");
}
xxxxxxxxxx
//Write a program that computes and assesses the tuition fee of the students in one trimester,
//based on the given mode of payment below.
//Plan(key): (1)Cash (2)Two-Installment (3)Three-Installment
//Discount(-) or Interest(+): 10% Discount, 5% Interest, 10% Interest
//The target-user must use the key in selecting or choosing the mode of payment.
//The first input data is the tuition fee, and the second input data is the mode of payment.
#include<stdio.h>
main()
{
float tf,mop,ttf,d,i;
printf("\nEnter tuition fee: ");
scanf("%f",&tf);
printf("\nSelect the desired key number below");
printf("\n(1)Cash (2)Two-Installment (3)Three-Installment");
printf("\n\nEnter mode of payment: ");
scanf("%f",&mop);
if(mop==1)
{
d=tf*0.10;
ttf=tf-d;
printf("\nThank you for choosing cash method!");
printf("\nYou have 10% discount.");
printf("\nYour total tuition fee is: %f\n",ttf);
}
else if(mop==2)
{
i=tf*0.05;
ttf=tf+i;
printf("\nYour total tuition fee is: %f\n",ttf);
}
else if(mop==3)
{
i=tf*0.10;
ttf=tf+i;
printf("\nYour total tuition fee is: %f\n",ttf);
}
else
printf("\n\nERROR VALUE!\n");
}