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 Answers
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