Advertisement
stamen4o

Sum of 5 numbers using Nakov.IO

Mar 17th, 2014
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using System;
  2. using Nakov.IO;
  3.  
  4. namespace sumOf5Numbers
  5. {
  6. class sumOf5Numbers
  7. {
  8. static void Main()
  9. {
  10. Console.Title = "Sum Of 5 Numbers";
  11. Console.Write("Enter 5 decimal numbers separated by a space: ");
  12. decimal first = Cin.NextDecimal();
  13. decimal second = Cin.NextDecimal();
  14. decimal third = Cin.NextDecimal();
  15. decimal fourth = Cin.NextDecimal();
  16. decimal fifth = Cin.NextDecimal();
  17. decimal sum = first + second + third + fourth + fifth;
  18. Console.WriteLine(sum);
  19. Main();
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement