+ 1

What am I doing wrong?(the kindle challenge)

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");

2nd Jan 2021, 12:57 AM
Swiff _Vastolorde
Swiff _Vastolorde - avatar
2 Respostas
+ 5
This code looks incomplete, but you have a semicolon after the if condition. if(age <= 19); <--- remove semicolon
2nd Jan 2021, 1:21 AM
ChaoticDawg
ChaoticDawg - avatar
0
Delete semicolon and add space after if statement
13th Feb 2022, 1:42 PM
Tracy Hudson