Technology has advanced to the point where programming has become an essential part of our lives. We use software and applications for communication, entertainment, education, and work, and these are all built on programming languages.

Progarm to state that a person can cast vote or not. [Note: A person can cast vote if he is 18 years old or above]



Explanation,
Here name is string so as it is defined as character of array 50. The specifier is %s is used to take scanf and value in age is checked with 18 and if it is equal to 18 or greater than this s/he can cast vote and if it is less than 18 and s/he cannot vote.








  Exercise:  Make a program that can say he is old or yound. [Note if s/he is greater than age 40 than he is old and if he less than 40 then he is young.]
Share:

No comments:

Post a Comment

If you have any doubt, let me know...

Translate

Wikipedia

Search results