Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exercise4
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Vyvedi n:");
- double n = double.Parse(Console.ReadLine());
- double sum;
- int devided = 0;
- for (int i = 1; i <= n; i++)
- {
- sum = Math.Pow(i, 3) + 3 * i + n;
- if(sum % 17 == 0)
- {
- devided++;
- }
- }
- Console.WriteLine("Broi na chislata kratni na '17': {0}",devided);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement