₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,326,268 members, 8,425,744 topics. Date: Saturday, 13 June 2026 at 01:35 AM

Toggle theme

a - Programming - Nairaland

Nairaland ForumScience/TechnologyProgramminga (2127 Views)

1 Reply (Go Down)

a by Nobody:
Re: a by TJX(m): 2:47pm On Oct 06, 2011
I don't want to register on your website. Sorry smiley This is C# 4.0


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Contest4 {
class Program {
static void Main(string[] args) {
Console.WriteLine("Result = {0}", Contest4(2, 3, 5, 15));
}
static long Contest4(long a, long b, long c, long d) {
var inputs = new[] { a, b, c };
var result = new List<long>(inputs);
var counter = 0L;
var multiple = 0L;
foreach (var input in inputs) {
counter = 1L;
while ((multiple = input * counter++) < d)
if (!result.Contains(multiple))
result.Add(multiple);
}
return result.Sum();
}
}
}

Re: a by Nobody:
Re: a by ektbear: 7:37pm On Oct 06, 2011
Interesting. I'll check this out over the weekend.
Re: a by baslone: 11:58am On Oct 08, 2011
omo_to_dun:
No problem. But I can't do anything with your code, since the auto-compiler on that site does everything for me.
@omo_to_dun, , name me a good web host you know won't disappoint(payments in Naira)!

Waitin. . . .
Re: a by sherif1: 7:26am On Oct 11, 2011
hello guys! Do u know dt others are willing to pay for services u can easily render. Services may include editing of codes, designing logo or any services u thinj people wil love to pay for.
Check out www.1knaira.com where u can buy or sell your online services for naira1,000. Signing up is free
Re: a by olamide360: 7:51am On Oct 11, 2011
OK what all this!
Re: a by tundebabzy: 11:11pm On Oct 12, 2011
omo_to_dun:
Hello Nairalanders,

Programming challenges are an easy way to apply your knowledge of a new language or an already perfected language. You can solve this deceptively simple contest:

   Crazy Multiples

if you have the time and the skill.

Once again, I'd like to thank tundebabzy for advertising my site. I had so much traffic in one day that my server almost collapsed.
grin grin
If I can't put Nigeria on the map, I could assist someone else to do so
1 Reply

Top Coder Programming Contest For Java DevelopersBells University Wins Computer Programming ContestNairaland Programming Contest (8-Puzzle)234

Tools And Software For Learning How To HackWhy It's Important To Be Very Well-rounded TodayProgrammers I've Got A Question