Monday, November 22, 2021

Student Year Level in C

 Machine Problem in C

Write a  program to display the high school level of  a student, based on its year-entry. For example, 

the year-entry 1 means the student is a freshman,  2 for sophomore, and so on. Here are the given criteria:

Year-entry number                                 High - School Level

1 Freshman

2 Sophomore

3 Junior

4 Senior

Other entry no. "Out-of-School"

 I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.





Program Listing

year_level.c

/*

Author : Jake Rodriguez Pomperada, MAED-IT, MIT

www.jakerpomperada.com and www.jakerpomperada.blogspot.com

jakerpomperada@gmail.com

Bacolod City Negros Occidental Philippines


Machine Problem in C


Write a  program to display the high school level of 

a student, based on its year-entry. For example, 

the year-entry 1 means the student is a freshman,

 2 for sophomore, and so on. Here are the given criteria:


Year-entry number              High - School Level


1 Freshman

2 Sophomore

3 Junior

4 Senior


Other entry no. "Out-of-School"


*/


#include <stdio.h> 

  

main()

{

    int num;

   

   printf("\n");

   printf("\tStudent Year Level in C");

   printf("\n\n");

   printf("\tEnter year-entry number: ");

   scanf("%d",&num);

   

   printf("\n");

   if (num==1)

        printf("\t You Belong To Freshmen.");

else if (num==2)

      printf("\t You Belong To Sophomore.");

else if (num==3)

      printf("\t You Belong To Junior.");

else if  (num==4)

      printf("\t You Belong To Senior.");

else 

      printf("\t Out-of-School");

   printf("\n\n");

   printf("\tEnd of Program");

   printf("\n"); 

}




No comments:

Post a Comment