Scaling your Grades

Wednesday 1 May 2013

Being a student is challenging, there are a lot of pressures not just in your subjects but also with your professors, yet you can still find lots of fun with your friends. One thing we look forward to when semesters are near ending are the grades we get from our professors. Most of us hope for the best grades, some  of us accept any grades as long as it is on the passing rate.

Thinking about this, I come up with the idea of making a grade scale program which will determine if your grade is poor, satisfactory or excellent. In this program, the grades you input will be evaluated. Check out the codes below.



#include<stdio.h>
#include<conio.h>

main()
{

 float var2;
 printf("PASSED or FAILED??\n");
 printf("Enter your grade in any subject: ");
 scanf("%f", &var2);
 printf("\nYour grade is %.2f. ", var2);
 if(var2==75)
    printf("Just enough to get you through!\n");        
 else
    if(var2<75)
       printf("Sorry but you have to repeat the subject!\n");     
    else   
       if(var2>75 && var2<80)
          printf("You made it, but you have to try harder next time!\n");
       else
          if(var2>=80)

Relationship Between Two Numbers

We all know that numbers are simple yet complex figures. First thing we understand about numbers is that  they differ from one another when it comes to equality. Every numbers like letters, when combined together they form another kind of figures which may be larger than the other numbers, smaller, they may also be equal or not equal.

Since kindergarten, we are taught how to determine the relationship between two integers/numbers, if it is equal to or not equal to than the other number. So I made a program that is used to determine the relationship between two integers/numbers easily. The program that is shown below is more faster in figuring out the relationship and more useful when teaching your younger ones. Check out the codes below.



#include<stdio.h>
#include<conio.h>

main()
{
 int var1, var2;
 printf("Enter two numbers and I will tell you \n the relationships they satisfy: ");
 scanf("%d%d", &var1, &var2);

 if(var1==var2)
   printf("%d is equal to %d\n", var1, var2);
 else
   printf("%d is not equal to %d\n", var1, var2);  

Simple "printf" command

In making C/C++ programs we always encounter these commands: printf and %d. Both of these commands are vital in making programs because both of it are useful especially in printing integers for mathematical purposes. So, I thought of making a simple program to showcase the printf and %d commands.

Furthermore, printf command is used to instruct the computer to perform an action. While, %d is a conversion specifier which means that an integer must be printed out on the screen. In this program, it shows how to use the printf and %d commands. It will simply call the integers declared at the top and there will be no need to get inputs from the user. Check out the codes below.



#include<stdio.h>
#include<conio.h>

main()
{
int var1 = 9, var2 = 10, var3 = 9;
if(var1!=var2)
              printf("\n%d", var1);
             

if(var1!=var3)
              printf("\n\n%d", var1);
              printf("\n%d", var2);
              printf("\n%d", var3);

Related Posts Plugin for WordPress, Blogger...