0

Hi , I am still new and I am not sure exacly what I am doing wrong . This is from the "let the party begin " practice.

I dont need the full answer but maybe just someone to point me in the right direction . 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) { int balloons = n-14 int n; balloons = ToInt32(Console.ReadLine()); n = ToInt32(Console.ReadLine()); //your code goes here //30-14=16 Console .WriteLine() balloons; } } }

27th Sep 2021, 5:27 PM
Eric Pregent
2 ответов
+ 1
Ok thanks I will try to make sens of all this .
27th Sep 2021, 5:43 PM
Eric Pregent
0
int balloons = n-14 //This above statement gives errors, 'n' is stil not declared (declared after it and must be initialised) so you can't use here, and put semicolon at end. int n; And ToInt32() method not in proper syntax. Corrected lines : balloons = Convert.ToInt32(Console.ReadLine()); ; //your code goes here //30-14=16 Console .WriteLine() //add semi colon and it just puts a empty new line only... balloons; //this is no effect. Useless. If you want print Console.WriteLine(balloons); and need calculation after intitialzations.. make these changes and try again.. hope it helps..
27th Sep 2021, 5:39 PM
Jayakrishna 🇮🇳