// Arup Guha
// 1/5/2013
// Solution to Programming Knights Practice Program Chapter 7 Problem 4
// Scholarship

#include <stdio.h>

#define LOW_SCHOLARSHIP 1000
#define MID_SCHOLARSHIP 2500
#define HIGH_SCHOLARSHIP 5000

int main() {

    int sat;
    double gpa;

    // Get the student's scores.
    printf("Please enter your SAT score.\n");
    scanf("%d", &sat);
    printf("Please enter your unweighted GPA.\n");
    scanf("%lf", &gpa);

    // Notice dividing by 1000.0 to force real number division.
    double composite = sat/1000.0 + gpa;
    int amount;

    // Calculate scholarship value.
    if (composite <= 4)
        amount = 0;
    else if (composite < 5)
        amount = LOW_SCHOLARSHIP;
    else if (composite < 6)
        amount = MID_SCHOLARSHIP;
    else
        amount = HIGH_SCHOLARSHIP;

    // Print out an appropriate message!
    if (amount > 0)
        printf("Great, you got a scholarship for $%d!\n", amount);
    else
        printf("Sorry, you did not receive a scholarship.");

    return 0;
}
