A simple program that I wrote that will ask the user to give its year level they belong using case statement in Turbo Pascal. The code is very simple and easy to understand.
Program High_School;
Uses WinCrt;
Var
Year : Integer;
Begin
Clrscr;
Writeln;
Write('Give Year Level : ');
readln(Year);
Case Year Of
1: Writeln(' You are belong to Freshmen');
2: Writeln(' You are belong to Sophomore');
3: Writeln(' You are belong to Junior');
4: Writeln(' You are belong to Senior');
Else
Writeln(' Out of School ');
End;
Readln;
End.
Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
Uses WinCrt;
Var
Year : Integer;
Begin
Clrscr;
Writeln;
Write('Give Year Level : ');
readln(Year);
Case Year Of
1: Writeln(' You are belong to Freshmen');
2: Writeln(' You are belong to Sophomore');
3: Writeln(' You are belong to Junior');
4: Writeln(' You are belong to Senior');
Else
Writeln(' Out of School ');
End;
Readln;
End.
No comments:
Post a Comment