New course! Every coder should learn Generative AI!
- 2

Airlines are offering a special promotion for teenagers and are offering kindles to use during the flight. Write a program to take passengers' age as input, and output "Take your kindle", if the age is under or equal to 19. Sample Input 14 Sample Output Take your kindle

21st Jun 2022, 4:21 PM
BINIAM EPHREM
+ 1
Biniyo Ephr Without your attempts how we can help you? Take age input using Console.ReadLine() method and compare age with given age 19 If age <= 19 then print expected result "Take your kindle"
21st Jun 2022, 6:17 PM
A͢J
+ 1
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { //taking the age as input int age = Convert.ToInt32(Console.ReadLine()); //your code goes here if(age<=19) { Console.WriteLine("Take your kindle "); } } } } // Try not to follow me !!!
19th Aug 2022, 6:12 AM
Abdul Bari Rahmani
0