Responsive Ads Here

Monday, November 17, 2014

Grade point (if else)

Grade point (if else)

 

 

#include<stdio.h>
int main()
{
    int x;
    printf("input your number:");
    scanf ("%d",&x);
    if (x>=90 && x<100)
        printf("Congratulation!!! You have got A");
    else if (x>=80 && x<90)
        printf("You have got B");
    else if (x>=70 && x<80)
        printf("You have got C");
    else if (x>=60 && x<70)
        printf("You have got D");
    else if (x>=50 && x<60)
        printf("You have got E");
    else
        printf("Ops!! You have failed.");
    return 0;
}

No comments:

Post a Comment

php4

<?php    // Start the session  session_start();  ?>  <!DOCTYPE html>  <html>  <head>       <link rel=&q...