Advertisement
rosenrusev

Problem 1 - SumOfThreeIntegers

Mar 15th, 2014
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace SumOfThreeIntegers
  7. {
  8. class SumOfThreeIntegers
  9. {
  10. static void Main()
  11. {
  12. Console.Write("Enter value a: ");
  13. double a = double.Parse(Console.ReadLine());
  14.  
  15. Console.Write("Enter value b: ");
  16. double b = double.Parse(Console.ReadLine());
  17.  
  18. Console.Write("Enter value c: ");
  19. double c = double.Parse(Console.ReadLine());
  20.  
  21. double sum = a + b + c;
  22.  
  23. Console.WriteLine("The sum is: {0}", sum);
  24.  
  25. //That's pseudo code comment for integer variables:
  26. //
  27. //Console.Write("Enter value a: ");
  28. //int a = int.Parse(Console.ReadLine());
  29. //Console.Write("Enter value b: ");
  30. //int b = int.Parse(Console.ReadLine());
  31. //Console.Write("Enter value c: ");
  32. //int c = int.Parse(Console.ReadLine());
  33.  
  34. //int sum = a + b + c;
  35.  
  36. //Console.WriteLine("The sum is: {0}", sum);
  37. }
  38. }
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement