Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace SumOfThreeIntegers
- {
- class SumOfThreeIntegers
- {
- static void Main()
- {
- Console.Write("Enter value a: ");
- double a = double.Parse(Console.ReadLine());
- Console.Write("Enter value b: ");
- double b = double.Parse(Console.ReadLine());
- Console.Write("Enter value c: ");
- double c = double.Parse(Console.ReadLine());
- double sum = a + b + c;
- Console.WriteLine("The sum is: {0}", sum);
- //That's pseudo code comment for integer variables:
- //
- //Console.Write("Enter value a: ");
- //int a = int.Parse(Console.ReadLine());
- //Console.Write("Enter value b: ");
- //int b = int.Parse(Console.ReadLine());
- //Console.Write("Enter value c: ");
- //int c = int.Parse(Console.ReadLine());
- //int sum = a + b + c;
- //Console.WriteLine("The sum is: {0}", sum);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement