Advertisement
Qrist

26

Apr 3rd, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Unknown
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int a = 83679;
  10.             int a1, a2, a3, a4, a5;
  11.             a1 = a / 10000;
  12.             a2 = a % 10000 / 1000;
  13.             a3 = a % 1000 / 100;
  14.             a4 = a % 100 / 10;
  15.             a5 = a % 10;            
  16.             Console.WriteLine(a1+a2+a3+a4+a5);                      
  17.  
  18.         }
  19.  
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement