Write a program to enter two digits number and add them and print its value
taannaa:
in qbasic?
Answers
Answered by
1
A C# Program:
using System;
namespace WorkSpace
{
public class Program
{
private static void Main(String[] Arguments)
{
string UserValue1 = Console.ReadLine();
string UserValue2 = Console.ReadLine();
UserValue1 = Int32.Parse(UserValue1);
UserValue2 = Int32.Parse(UserValue2);
int OutPut = UserValue1 + UserValue2;
Console.WriteLine(OutPut.ToString());
Console.ReadLine();
}
}
}
the source is attached.
using System;
namespace WorkSpace
{
public class Program
{
private static void Main(String[] Arguments)
{
string UserValue1 = Console.ReadLine();
string UserValue2 = Console.ReadLine();
UserValue1 = Int32.Parse(UserValue1);
UserValue2 = Int32.Parse(UserValue2);
int OutPut = UserValue1 + UserValue2;
Console.WriteLine(OutPut.ToString());
Console.ReadLine();
}
}
}
the source is attached.
Similar questions