answersLogoWhite

0


Best Answer

#include<stdio.h>

#include<conio.h>

main()

{

int age;

printf(" enter the age ");

scanf("%d",&age);

if(age>18)

{

printf(" citizen can give vote ");

}

else

{

printf(" citizen cannot give vote");

}

return 0;

}

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to accept name age and print eligible for vote or not?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you print my name in c program in vertical manner using arrays?

you need strings to print any character(your name) this is not possible useing array:D


Write a c program to accept name and store the name in its short form?

happy birthday...


What is the program to input name and print pass or fail?

Input "enter name" ;n$ input "enter marks" ; m ifm &gt; 40 then print n$, "pass" else print n$, "fail"


Write a program to accept name and store the name in it's short form as eg sikkim manipal university SMU?

Write a program to accept name and store the name in its short form (e.g. Sikkim Manipal University should be stored as SMU)


How to write a program to accept the user name and password and then shop this is your Password?

you cant


How do you write the pseudo code for a program that print initials?

Example: start ask the name for each word . print first letter stop


How do make 10student name and his remarks in q-basic?

' '*** PROGRAM: Collecting student data: names/marks. ' '*** Create 2 array variables to store each students name/marks... DIM students$(10), marks$(10) '*** SCREEN ONE/Collect the data... CLS '...(CL)ear the Output (S)creen '*** print heading... PRINT "PROGRAM: Collecting each student names/marks..." PRINT '*** A FOR/NEXT loop is used to collect each individual students data... FOR eachStudentNo% = 1 TO 10 '*** Get each students names/marks 'by typing these values in from the keyboard.... PRINT eachStudentNo%; "&gt;" INPUT " Enter student name"; students$(eachStudentNo%) INPUT "Enter student marks"; marks$(eachStudentNo%) NEXT '*** SCREEN TWO: Output the collected data... CLS '...(CL)ear the Output (S)creen '*** Print headings... PRINT "Student No.", "Student Name", "Student Marks" PRINT '*** FOR/NEXT loop is used to print out the 2 array student 'name/marks' values... FOR eachStudentNo% = 1 TO 10 '*** print out each students 'number/name/mark' values... PRINT eachStudentNo%, PRINT students$(eachStudentNo%), PRINT marks$(eachStudentNo%) NEXT END '...END of program/halt program code execution


How do you write a program to enter your name in c using?

/*to print your namr*/ /*by girish kumar raghuvanshi*/ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { printf("print ur name"); puts("girish"); getch(); }


Design an algorithm that will accept a perons name from the screen entered as surname first name separated by a comma Your program is to display the name as first name followed by three blanks?

Design an algorithm that will accept a perons's name from the screen entered as surname, first name, separated by a comma. Your program is to display the name as frist name, followed by three blanks, followed by the surname. -defining diagram -pseudocode algorithm


Can a bank refuse to accept a check if the name of the issuing bank is not on the check?

Is this a hypothetical question or are you aware of a bank that actually does not print its name on its checks? Banks can refuse to accept checks they believe to be counterfeit, and a check without the name of the issuing bank on it sure sounds like it might be counterfeit to me.


How do you get your name to be undefined on poptropica?

There is no way. You need a username and password to play, and the program will not accept all blank spaces or dashes.


How to write a Shell program to find the no of vowels in a text?

clear echo -n "Enter the Name / String:" while : do read name echo $name | awk '{print gsub(/[aeiou]/,"")}' done