Write a program segment that inputs Age, displays Yes, you can vote if Age is 18 or
Question:
Write a program segment that inputs Age, displays "Yes, you can vote" if Age is 18 or older and displays "You are too young to vote" if Age is less than 18, and displays nothing else. Remember to use the comparison operator when checking the value of Age in your If-Then-Else statements.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 56% (16 reviews)
Declare Age As Integer Writ...View the full answer
Answered By
Dorcas Juliet
I am a proficient tutor and writer with over 4 years experience, I can deliver A+ works in all fields related to business and economics subject. Kindly hire me for excellent papers
4.70+
10+ Reviews
51+ Question Solved
Related Book For
Question Posted:
Students also viewed these Computer science questions
-
Write a program segment that inputs Age and displays "You are too young to vote" if Age is less than 18 (and displays nothing else).
-
Use a While loop in a program segment that inputs numbers from the user until the number entered is an integer.
-
Use a While loop in a program segment that inputs numbers from the user until the number entered is an integer.
-
Data on the length, in seconds, of a sample of 50 songs by The Beatles are presented in the accompanying data table. Complete parts (a) through (d) below. Click the icon to view the table of song...
-
Determine a transfer function representation for the following state variable models using the tf function: (a) (b) (c) 3s23s 1 101 047 104 125 2 2 0
-
On January 1, 2017, Blizzards-R-Us purchased a snow-blowing machine for $125,000. The machine was expected to have a residual value of $12,000 at the end of its 5-year useful life. On January 1,...
-
Consider a sample taken from the population of all taxi-in times for all flights that land in Los Angeles. Identify the symbols used for the sample standard deviation, the population standard...
-
Draw a project network from the following information. Activities B and H can be shortened to a minimum of 2 weeks. Which activity would you shorten to reduce the project duration by 2 weeks?Why?...
-
1 0 Presented here are selected transactions for Niska Inc. during August of the current year. Niska uses a perpetual inventory system. It estimates a return rate of 1 2 % , based on past...
-
Design a basic Expert System, which should include a Knowledge Base, Working Storage, User Interface, and an Inference Engine This system should have the capability to research products that are for...
-
Draw a flowchart that corresponds to Exercise 34. Data from Exercise 34 Write a program segment that inputs Age and displays "You are too young to vote" if Age is less than 18 (and displays nothing...
-
Draw a flowchart that corresponds to Exercise 36. Data from Exercise 36 Write a program segment that inputs Age, displays "Yes, you can vote" if Age is 18 or older and displays "You are too young to...
-
In Exercises 3952, find all zeros of the polynomial function or solve the given polynomial equation. Use the Rational Zero Theorem, Descartess Rule of Signs, and possibly the graph of the polynomial...
-
Sams building that was used for business was partially destroyed by a hurricane. There was no insurance for hurricane damage. The building had an adjusted basis of $46,000. The FMV was $90,000 just...
-
What is the strategic planning process and what are the requirements for employee participation, and what are the deliverables of such a process? How is IT support and planning tied to overall...
-
The concept of "Power Payments" will help you repay your loans faster and reduce your total interest payments. Consider a situation where you have 3 loans: Loan A has a loan payment of $500/month and...
-
On the first day of the fiscal year, Lisbon Co. issued $1,000,000 of 10-year, 7% bonds for $1,050,000, with interest payable semiannually. The fiscal year of the company is the calendar year. Prepare...
-
Complete the table below assuming the shrinkage= 18%, and determine the cost of any either waste or borrow volume if you know both cost about 16 US$ per yard, then plot the mass diagram on the...
-
Draw all possible stereoisomers for each of the following compounds: a. 2-chloro-3-hexanol b. 2-bromo-4-chlorohexane c. 2,3-dichloropentane d. 1,3-dibromopentane
-
What kind of financial pressures can an LBO cause?
-
Compare and contrast HDLC with PPP.
-
Compare the flag byte and the escape byte in PPP. Are they are the same? Explain.
-
In Figure 11.20, explain why we need only one address field. Explain why the address is set to the predefined value of (11111111) 2. Figure 11.20 (11111111)2 (00000011)2 Flag Address Control Protocol...
-
1. What should the return value type of the following method be? public static __________ myMethod(int num1, int num2) { System.out.println("hello!! :)"); return num1 + num2; } A. void B. ...
-
Darla and her husband recently divorced. As part of the property settlement, Darla received title to the couple's former residence. However, Darla cannot set foot in the house because memories of her...
-
"What role does symbolic interactionism play in the construction and perpetuation of social norms, and how do these norms evolve over time through processes of socialization and collective action?"
Study smarter with the SolutionInn App