Read two integer values, in this case, the variables A and B. After this, calculate the sum between them and assign it to the variable SOMA. Write the value of this variable.
Solution
Before seeing the
solution make sure that you tried enough. Don’t paste the whole code, just find
out the logic
using System;
namespace _1003_Simple_Sum
{
class Program
{
static void Main(string[] args)
{
int A, B, SOMA;
A =
Convert.ToInt32(Console.ReadLine());
B =
Convert.ToInt32(Console.ReadLine());
SOMA = A + B;
Console.WriteLine("SOMA = " + SOMA);
Console.ReadKey();
}
}
}
Post a Comment