Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class StringToChar
- {
- static void Main()
- {
- int number = 3456;
- char a0 = number.ToString()[0];//3
- char a1 = number.ToString()[1];//4
- char a2 = number.ToString()[2];//5
- char a3 = number.ToString()[3];//6
- int count = 0;
- //в този случай могат да се сравняват
- Console.WriteLine(a3 * a0); // 2754
- if(a0 > a1)
- {
- count++;
- }
- if(a1 > a2)
- {
- count++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment