I am really new to Pascal I am a junior at Sprague High School and i am looking for some help?
I am writing this program to have the user Input there name and age and then the comput outputs if they can vote or not..
BUT
This is my procedure for outputting Vote Or not.
Procedure Output( Name : String; Age : Integer );
Begin
If ( age < 18) {or (age = 18)} Then
Write(' You Can Vote ' , Name , '! ')
else
If (age > 18) or (age = 18) Then
Write(' Sorry Cant Vote Yet...');
end;
Now when i run it it works and i input a name..and an age..but when i input an age over 18 like say i do 24 it still says that i cant vote...I am sure its something simple but god its a mind boogler i am getting frustrated and this stuff is do tomorrow morning first period.
thanx alot :-
I am writing this program to have the user Input there name and age and then the comput outputs if they can vote or not..
BUT
This is my procedure for outputting Vote Or not.
Procedure Output( Name : String; Age : Integer );
Begin
If ( age < 18) {or (age = 18)} Then
Write(' You Can Vote ' , Name , '! ')
else
If (age > 18) or (age = 18) Then
Write(' Sorry Cant Vote Yet...');
end;
Now when i run it it works and i input a name..and an age..but when i input an age over 18 like say i do 24 it still says that i cant vote...I am sure its something simple but god its a mind boogler i am getting frustrated and this stuff is do tomorrow morning first period.
thanx alot :-