Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- int result = Console.ReadLine().ToString().Sum(c => c - '0');
- Console.WriteLine(result);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement