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 Zad3
- {
- class Program
- {
- static void Main(string[] args)
- {
- int exponent, broj;
- int result = 1, i, j;
- Console.WriteLine("Unesite broj: ");
- broj = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Unesite eksponent broja: ");
- exponent = Convert.ToInt32(Console.ReadLine());
- int y = broj, z = exponent;
- for ( i = 1; i < broj; i++)
- {
- for ( j = 1; j < exponent; j++)
- {
- y += z;
- }
- z = y;
- }
- Console.WriteLine("Rezultat je " + y);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement