0
Problem task on the C#
Please help me in my problem. My code below ( ・ω・)☞ 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) { Console.Write(); int sum1 = Convert.ToInt32(Console.ReadLine()); Console.Write(); int sum2 = Convert.ToInt32(Console.ReadLine()); GetSum(); } static int GetSum(sum1,sum2) { return sum1 + sum2; } } }
2 Respostas
0
_ᙢǾሊỢȡΘŬ_
Your method has return type integer so when you call method then you have to store returned value in a variable.
And also you didn't passed parameters in calling method.
So do this:
int sum = GetSum(sum1, sum2);
0
No