Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,194,452 members, 7,954,780 topics. Date: Saturday, 21 September 2024 at 09:07 AM |
Nairaland Forum / Science/Technology / Programming / Simple Php Challenge (9618 Views)
Please Help Me Write This Simple Php Switch Statement / Simple PHP Quiz: Kill The Rand() / Simple Php Quiz: Why Will This Code Not Work If You Are Uploading Files? (2) (3) (4)
(1) (2) (3) (4) (Reply) (Go Down)
Re: Simple Php Challenge by elvis10ten(m): 5:09pm On Jul 13, 2013 |
pc guru: Addition is compulsory what if i use Bit Shiftingnope. You must use only addition here, but you can also do that and show us atleast we can learn something from it cause i think we already have a winner. |
Re: Simple Php Challenge by Nobody: 5:19pm On Jul 13, 2013 |
elvis10ten: nope. You must use only addition here, but you can also do that and show us atleast we can learn something from it cause i think we already have a winner.Oops sorry i goofed it won't work, just tried it. |
Re: Simple Php Challenge by Youngzedd(m): 5:51pm On Jul 13, 2013 |
Ajibel: Why only PDP what of oda langs. APC will join soon. |
Re: Simple Php Challenge by WhiZTiM(m): 6:18pm On Jul 13, 2013 |
spikes C:hahahaha. *falls off the tree. |
Re: Simple Php Challenge by WhiZTiM(m): 6:27pm On Jul 13, 2013 |
Judinho59:e be like sey some una conspire sey mek my phone spoil and mek MTN dey jonze me. Haba, spikes C na Oga oh... Bros, e be like sey u wan see stunts from me. Abeg, I am human. How you doing?? |
Re: Simple Php Challenge by WhiZTiM(m): 6:34pm On Jul 13, 2013 |
spikes C:*hahahahaha! #Oga spikes C don crack my ribs oh. Oboi, that time never come... Its probably when I am faced with a problem in Java that I would learn Arabic writing and present my solution in Arabic.. . .#hehe #i dey throw you salute! |
Re: Simple Php Challenge by Nobody: 6:38pm On Jul 13, 2013 |
WhiZTiM: |
Re: Simple Php Challenge by WhiZTiM(m): 6:49pm On Jul 13, 2013 |
here is my solution! ...in Python 2.7
Python 3 will be
I am on an old mobile phone now... Cant IDEOne it yet. The solution I would have presented in C++, that follows the rules; has already been presented...! Thats why, I decided to make my solution shortest... Ohkay, I agree not a solution but an answer. And I used the language best suited for 'my goal' AND this exact problem... #PythonSquad. BTW, C++ rules. ... (#looksForTrouble) |
Re: Simple Php Challenge by spikesC(m): 7:12pm On Jul 13, 2013 |
Mogbe ooooo I have not seen a solution in Java ooo. That one go be 2 pages Besides, oga Whiztim, ur sollution does not follow d rules C++ rules |
Re: Simple Php Challenge by WhiZTiM(m): 7:50pm On Jul 13, 2013 |
spikes C: Mogbe ooooo. . . Yes I know... That is why i wrote. WhiZTiM: |
Re: Simple Php Challenge by naijainfogalery: 8:05pm On Jul 13, 2013 |
its always better you know the basics first start with w3schools.com or code.org Abu Mikey: [size=64pt]I take God beg una,Make person volunteer to teach me Programming abeg!!![/size] |
Re: Simple Php Challenge by ablyguy(m): 8:06pm On Jul 13, 2013 |
Too easy man! Bring something more challenging. Make it an algorithm challenge. Don't restrict it to a particlular language... |
Re: Simple Php Challenge by humanbean: 8:09pm On Jul 13, 2013 |
WhiZTiM: . . . Yes I know... That is why i wrote. [/quote] Oga WhiZTiM I don present for Py na . Make me sef find small trouble. Abeg who fit code dis tin in assembly language? |
Re: Simple Php Challenge by laykhorn(m): 8:10pm On Jul 13, 2013 |
Boll2010: bro u can do ursef good by downloadn vid tutorials on youtube notin u tinkn 4 nw dt oyinbos avnt done so use wat uv got 4 nw,no 1 tot me web designin,netwrkn,n sql database atleast I can handle stuffs wit wat I learnt,no 1 is collectin my money no more.I've been having problems tryin to download from youtube... Can you tell me the procedures required. Please!! |
Re: Simple Php Challenge by ablyguy(m): 8:11pm On Jul 13, 2013 |
obadiah777: LMAO. BROS THIS PROGRAMMING THING NO BE SMALL THING OOO. SOME PEOPLE THINK IN NUMBERS. THOSE ARE THE ONLY PEOPLE WHO WILL BE GOOD AT IT. Numbers have very little to do with it. If you're very good at reasoning logically, you'll be good at it... |
Re: Simple Php Challenge by Burger01(m): 8:16pm On Jul 13, 2013 |
spikes C: |
Re: Simple Php Challenge by Burger01(m): 8:19pm On Jul 13, 2013 |
spikes C: Oboy, you funny no be small. Na programming make you this way? |
Re: Simple Php Challenge by WhiZTiM(m): 8:21pm On Jul 13, 2013 |
spikes C: Mogbe ooooo#hehe... You are looking for trouble ohh. |
Re: Simple Php Challenge by sway112: 8:22pm On Jul 13, 2013 |
Pls am new beginner in programming I use c++ #include<iostream> Using namespace std; Int main() { Int n,sum=0, count; For(n = 7, count=1; count<301; count++) { Sum+= n; Cout<<"7 * "<<n<<" = "<< sum<< endl; } Return 0; } |
Re: Simple Php Challenge by elvis10ten(m): 8:26pm On Jul 13, 2013 |
ablyguy: Too easy man! Bring something more challenging. Make it an algorithm challenge. Don't restrict it to a particlular language...just like the topic says its a simple challenge. Atleast attempt it before you say its simple, there are better ways to solve or achieve this and don't use other people solution. |
Re: Simple Php Challenge by Nobody: 8:29pm On Jul 13, 2013 |
@Whiztim nd Spikes.. Una no well at al http://ideone.com/gbJFDO public class Main{ (Addition is compulsory, no Bitwise shifting) #TeamJava |
Re: Simple Php Challenge by spikesC(m): 8:59pm On Jul 13, 2013 |
Judinho59: @Whiztim nd Spikes.. Una no well at al What is this They said a simple challenge that would not hurt the cpu Declaring classes up and down |
Re: Simple Php Challenge by Nobody: 12:09am On Jul 14, 2013 |
Was learning html on w3schools.com abt a year ago, wasted my time Btw Would dis php teach how hack |
Re: Simple Php Challenge by Djtm(m): 12:24am On Jul 14, 2013 |
humanbean: assembly language? WTF? Just how many pages will you use? Mov bull, shit |
Re: Simple Php Challenge by Djtm(m): 12:25am On Jul 14, 2013 |
Promhize: Was learning html on w3schools.com abt a year ago, wasted my time wasted your time?? Guess you were not practising enough. |
Re: Simple Php Challenge by humanbean: 12:56am On Jul 14, 2013 |
Djtm:
1 Like |
Re: Simple Php Challenge by humanbean: 1:26am On Jul 14, 2013 |
humanbean: Just started delving into programming. I don't know PHP but I took up your challenge in Python. The code is a function to accept any number from the user and output any number of multiples he desires. I used a for loop and addition as you asked, but I don't know how to test the cpu load. The main code is about 4 lines. Please point out how I can optimise this. So I rewrote the code for IDEOne.
Results are here - http://ideone.com/FlsbRi (Summary - time: 0.01s, memory: 7728 kB) |
Re: Simple Php Challenge by hammedkola(m): 6:48am On Jul 14, 2013 |
humanbean: Just started delving into programming. I don't know PHP but I took up your challenge in Python. The code is a function to accept any number from the user and output any number of multiples he desires. I used a for loop and addition as you asked, but I don't know how to test the cpu load. The main code is about 4 lines. Please point out how I can optimise this. You try, but this is a copy and paste job, you didn't type it here |
Re: Simple Php Challenge by elvis10ten(m): 10:20am On Jul 14, 2013 |
JUDINHO is the winner of this challenge. His php code runs properly and he followed the rules. @others that tried this, you also tried and most of you got it. Now we all know(if you don't already know) the relationship between addition and multiplication and also you got to know about www.ideone.com and its usefulness. Have a nice day all. |
Re: Simple Php Challenge by spikesC(m): 10:42am On Jul 14, 2013 |
elvis10ten: JUDINHO is the winner of this challenge. His php code runs properly and he followed the rules. @others that tried this, you also tried and most of you got it. wtf |
Re: Simple Php Challenge by elvis10ten(m): 10:48am On Jul 14, 2013 |
spikes C:wat ?. I told u to correct your code but you refused. |
Re: Simple Php Challenge by spikesC(m): 10:54am On Jul 14, 2013 |
elvis10ten: wat ?. I told u to correct your code but you refused. yes sir |
Please Help Me With VTU API / Help On Java / How Much It Cost To Build An App Like Uber Or Spotify
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 52 |