# How much Scholarship Codechef Solution

Hello coders, today we are going to solve How much Scholarship Codechef Solution which is a part of Codechef solution.

### Problem

The ZCO Scholarship Contest has just finished, and you finish with a rank of RR. You know that Rank 11 to Rank 5050 will get 100%100% scholarship on the ZCO exam fee and Rank 5151 to Rank 100100 will get 50%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 RR.

### Output

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

• 1≤R≤109

Sample Input

```49
```

Sample Output

`100`

### How much Scholarship CodeChef Solution in CPP

```#include<iostream>
using namespace std;
int main()
{
unsigned long long rank;
cin >> rank;
if (rank > 100)
{
cout << 0 << endl;
return 0;
}
else if (rank >= 1 && rank <= 50)
cout << 100 << endl;
else if (rank >= 51 && rank <= 100)
cout << 50 << endl;
return 0;
}```

### How much Scholarship CodeChef Solution in JAVA

```public static void main(String[] args)
{
long rank;
if (rank > 100)
{
System.out.print(0);
System.out.print("\n");
}
else if (rank >= 1 && rank <= 50)
{
System.out.print(100);
System.out.print("\n");
}
else if (rank >= 51 && rank <= 100)
{
System.out.print(50);
System.out.print("\n");
}
}
package tangible;
public final class ConsoleInput
{
private static boolean goodLastRead = false;
{
}
{
String input = "";
char nextChar;
{
{
input += nextChar;
}
}
//the first non white space character:
input += nextChar;
//accumulate characters until white space is reached:
{
input += nextChar;
}
return input;
}
{
}
{
}
public static String scanfRead(String unwantedSequence, int maxFieldLength)
{
String input = "";
char nextChar;
if (unwantedSequence != null)
{
nextChar = '\0';
for (int charIndex = 0; charIndex < unwantedSequence.length(); charIndex++)
{
if (Character.isWhitespace(unwantedSequence.charAt(charIndex)))
{
//ignore all subsequent white space:
{
}
}
else
{
//ensure each character matches the expected character in the sequence:
if (nextChar != unwantedSequence.charAt(charIndex))
return null;
}
}
input = (new Character(nextChar)).toString();
if (maxFieldLength == 1)
return input;
}