Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using Nakov.IO;
- namespace sumOf5Numbers
- {
- class sumOf5Numbers
- {
- static void Main()
- {
- Console.Title = "Sum Of 5 Numbers";
- Console.Write("Enter 5 decimal numbers separated by a space: ");
- decimal first = Cin.NextDecimal();
- decimal second = Cin.NextDecimal();
- decimal third = Cin.NextDecimal();
- decimal fourth = Cin.NextDecimal();
- decimal fifth = Cin.NextDecimal();
- decimal sum = first + second + third + fourth + fifth;
- Console.WriteLine(sum);
- Main();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement