Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace cifre001
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = 0, b = 0, k = 0, p = 0, c = 0;
- a = int.Parse(Console.ReadLine());
- b = int.Parse(Console.ReadLine());
- int auxa = a, auxb = b;
- while(a!=0)
- {
- p++;
- a /= 10;
- }
- while(b!=0)
- {
- k++;
- b /= 10;
- }
- if (p != k)
- Console.WriteLine("NU");
- else
- {
- Console.WriteLine("DA");
- }
- while (auxa != 0 && auxb != 0)
- {
- if (auxa % 10 == auxb % 10)
- c++;
- auxa /= 10;
- auxb /= 10;
- }
- Console.ReadKey();
- Console.WriteLine(c);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement