coasterka

#4SumOfThreeInts

Mar 19th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System;
  2.  
  3.     class SumOfThreeInts
  4.     {
  5.         static void Main()
  6.         {
  7.             Console.WriteLine("Enter first number: ");
  8.             float firstNum = float.Parse(Console.ReadLine());
  9.             Console.WriteLine("Enter second number: ");
  10.             float secondNum = float.Parse(Console.ReadLine());
  11.             Console.WriteLine("Enter third number: ");
  12.             float thirdNum = float.Parse(Console.ReadLine());
  13.             float sum = firstNum + secondNum + thirdNum;
  14.             Console.WriteLine("The sum of the three numbers is: {0}", sum);
  15.         }
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment