- 2
Please help me in CS
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
5 Réponses
+ 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"
+ 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 !!!
0
What is your attempt?
0
Airlines are offering a special promotion for teenagers and are offering kindles to use during the flight.
Write a program to take the passengers' age as input, and output "Take your kindle", if the age is under or equal to 19.