Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write a program, which reads 2 whole numbers and adds them together. Then, print them in the following format:“a + b = sum”
- using System;
- namespace _02._Add_Two_Numbers
- {
- class AddTwoNumbers
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int sum = a + b;
- Console.WriteLine("{0} + {1} = {2}", a, b, sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment