English, asked by khadeejazafar8185, 12 hours ago

Write a program that asks the user how many credits they have taken. If they have taken 23 or less, print that the student is a freshman. If they have taken between 24 and 53, print that they are a sophomore. The range for juniors is 54 to 83, and for seniors it is 84 and over.Gen​

Answers

Answered by nidaeamann
1

Explanation:

There are several ways in which the program can be written and in various programming languages

The below program is written in simple C language

int main void

{

char in;

int age;

printf ("Enter the number of credits user has taken ")

scanf("%c", &in)  

if (in<=23)

{

printf(""Freshman student")

}

elseif (in>23 and in<54)

{

printf(""Sophomore student")

}

elseif (in>=54 and in<83)

{

printf(""Senior student")

}

else

printf("Invalid number selection")

return

Similar questions