USING IF AND ELSE CONDITION EXECUTE THE FOLLOWING PROGRAM IN Q-BASIC:
Write a program to take the age of the user as input and display a message that “You
have age>18 and you can vote” and if age < 18 then “You cannot vote”.
Answers
Answered by
0
Explanation:
int main()
nt age;
printf("Enter your age");
scanf("%d", &age);
if(age >= 18):
printf("You can vote");
else:
printf("You cannot vote");
return 0;
Similar questions