Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //--------------------------------------
- // Programmed by Eric Paez-Parent for CIS 1500
- //--------------------------------------
- #include <stdio.h>
- // Define constants
- //--------------------------------------
- int main(void) {
- // Declare variables
- char first_I, second_I;
- int age_Y;
- float N_credits;
- // Input
- printf("Enter first initial:");
- scanf("%c", &first_I);
- printf("Enter second initial:");
- scanf("%c", &second_I);
- printf("Enter age:");
- scanf("%d", &age_Y);
- printf("Enter number of credits to graduate:");
- scanf("%f", &N_credits);
- //Output
- printf("Hi %c. %c. You are %d years old and still need %.1f credits to graduate.\n", first_I, second_I, age_Y, N_credits);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement