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