Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PE_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int sum = 0;
- for (int i = 0; i < 1000; i++)
- {
- if (i % 3 == 0 || i % 5 == 0) sum = sum + i;
- }
- Console.WriteLine(sum);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement