How much Scholarship ||codechef||beginner solution ||programming info

How much Scholarship

The ZCO Scholarship Contest has just finished, and you finish with a rank of R. You know that Rank 1 to Rank 50 will get 100% scholarship on the ZCO exam fee and Rank 51 to Rank 100 will get 50% percentage scholarship on the ZCO exam fee. The rest do not get any scholarship.
What percentage of scholarship will you get ?

Input

  • Input consist of single line of input containing one integer R.

Output

  • Output a single line containing one integer — the percentage of scholarship you will get.

Constraints

  • 1R109

Example Input 1

49

Example Output 1

100

Explanation 1

Since 14950, answer is 100 percentage scholarship.

Example Input 2

317

Example Output 2

0

Explanation 2

Since 317>100, you do not get any scholarship.

SOLUTION USING C LANGUAGE:-
#include <stdio.h> int main(void) { int R; scanf("%d",&R); if(R>=1 && R<=50) printf("100"); else if (R>=51 && R<=100) printf("50"); else printf("0"); // your code goes here return 0; }
Share:

No comments:

Post a Comment

Translate

Recommended platforms

  1. codechef
  2. hackerrank
  3. codeforces
  4. leetcode
  5. hackerearth

Popular Posts

programming_info. Powered by Blogger.

Blog Archive

Recent Posts

other platforms

  • geeks for geeks
  • w3schools
  • codepen
  • skillshare
  • udemy

Pages

reader support Support