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 Zadatak2Pokušaj2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Upisite prvi broj: ");
- int broj1 = int.Parse(Console.ReadLine());
- Console.Write("Upisite drugi broj: ");
- int broj2 = int.Parse(Console.ReadLine());
- int djelitelj = 0;
- for(int i = 2; i <= broj1*broj2; i++)
- {
- if(i % broj1 == 0 && i % broj2 == 0)
- {
- djelitelj = i;
- break;
- }
- }
- Console.WriteLine("Djelitelj = {0}", djelitelj);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement