Latest Posts:

cpp program that accept input from user to compute addition of two numbers to give result


//cpp program that prompt user to add two munbers then add the numbers to give result
#include<stdio.h>
int main()
{
    int score;
    score=100;
    printf("enter the score you wish:");
    scanf("%d",&score);
    if(score>=90)
    printf("this score awards an A");
    else if(score>=80)
    printf("this score awards a B+");
    else if(score>=70)
    printf("this score awards a B");
    else if(score>=60)
    printf("this score awards a c");
    else if(score>=50)
    printf("this score awards a d");
    else if(score>=40)
    printf("this score awards a D-");
    else if(score>=0)
    printf("this score awards an F");
    getch();
}

Share on Google Plus

About Lucky Ibitubo

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Powered by Blogger.