Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace dataTypes
- {
- public class floatOrInteger
- {
- public static void Main()
- {
- var num = Console.ReadLine();
- var digit = 0;
- foreach(var symbol in num)
- {
- digit = symbol - '0';
- Console.WriteLine(digit);
- }
- if (digit % 1 == 0)
- {
- Console.WriteLine(digit);
- }
- else
- {
- Console.WriteLine(Math.Round(digit));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement