Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Programming Challenge 1 - Membina Segi Tiga
01-02-2012, 04:05 AM, (This post was last modified: 06-02-2012, 05:23 PM by s3m00t.)
Post: #1
Programming Challenge 1 - Membina Segi Tiga
Assalamualaikum / Salam Sejahtera

Saya ingin membuka challenge kepada warga tbd untuk menyelesaikan masalah ini. Smile

SOALAN:
Bina satu aplikasi konsol yang membolehkan anda mencetak sebuah piramid dengan menggunakan sesuatu nilai kelebaran tapak. Piramid tersebut hendaklah dicetak dengan menggunakan karakter asterik (*).

OUTPUT:
[Image: 09423491748252902395.png]

SYARAT-SYARAT
  1. Piramid tersebut tidak boleh dicetak terus secara hardcoded.
  2. Jawaban perlulah di hantar kepada saya melalui PM.
  3. Anda HANYA dibenarkan menggunakan salah satu daripada language di bawah
  • C
  • C++
  • Java
  • Visual Basic 6
  • Visual Basic .NET
  • Python
  • PHP
  • Javascript
  • C#

Kenapa language-language ini sahaja? Sebab language-language ini je lah yang saya reti. -.- Selain daripada language ni, siapa yang nak check? Sad

btw, challenge ini tiada pemenang. Solver(s) akan disenaraikan dalam thread ini. sebelum saya di soal satu soalan wajib, elok lah saya nyatakan siap-siap bahawa tiada sebarang hadiah ditawarkan. GayFace lagipun, ini challenge senang. kalau susah, barulah berbaloi nak kasi hadiah. Big Grin

masalah ini dianggap solved jika anda berjaya mengeluarkan output yang sama. don't expect too high. GayFace aku tak kan tengok code efficiency dan sebagainya. more than enough untuk korang dapatkan output yang sama sahaja. Smile

SELAMAT BERJAYA! Big Grin

SOLVER(S)
@[smael]
@[johnburn]
@[c0mrade]
@[try]
@[Ahlspiess]
@[p0pc0rn]
@[r3v3r7]
@[#l0u7]
@[wcypierre]
@[Codeshift3r]
Reply
01-02-2012, 05:16 AM,
Post: #2
RE: Programming Challenge 1 - Membina Segi Tiga
ni kena guna loop ke??? ke guna if else pastu print camtu blh x? GayFace
POWERFUL HACKER IS A BRAIN.
Reply
01-02-2012, 05:19 AM,
Post: #3
RE: Programming Challenge 1 - Membina Segi Tiga
ha'a. kena guna loop. GayFace hardcoded print tak dibenarkan sama sekali. Smile

(01-02-2012, 05:16 AM)th3phantom Wrote: ni kena guna loop ke??? ke guna if else pastu print camtu blh x? GayFace

Reply
01-02-2012, 05:21 AM,
Post: #4
RE: Programming Challenge 1 - Membina Segi Tiga
(01-02-2012, 05:19 AM)ph33kr1 Wrote: ha'a. kena guna loop. GayFace hardcoded print tak dibenarkan sama sekali. Smile

(01-02-2012, 05:16 AM)th3phantom Wrote: ni kena guna loop ke??? ke guna if else pastu print camtu blh x? GayFace

owh ok..challenge accepted [ntah jadi ke x aku buat ni..hahaha]
POWERFUL HACKER IS A BRAIN.
Reply
01-02-2012, 05:23 AM,
Post: #5
RE: Programming Challenge 1 - Membina Segi Tiga
Selamat Berjaya! Big Grin

insya-Allah jadi nye. tak susah sangat challenge ni. Smile

(01-02-2012, 05:21 AM)th3phantom Wrote: owh ok..challenge accepted [ntah jadi ke x aku buat ni..hahaha]

Reply
01-02-2012, 06:21 AM,
Post: #6
RE: Programming Challenge 1 - Membina Segi Tiga
ok dah pm bro!! GayFace
POWERFUL HACKER IS A BRAIN.
Reply
01-02-2012, 09:08 AM, (This post was last modified: 01-02-2012, 09:10 AM by p0pc0rn.)
Post: #7
RE: Programming Challenge 1 - Membina Segi Tiga
kalau cmni cane? ;d
[Image: 74651599346694298982.png]
[Image: 3EsGZgg.png]
uno akhirnya kau ngaku gak ye
Reply
01-02-2012, 09:12 AM,
Post: #8
RE: Programming Challenge 1 - Membina Segi Tiga
mana perl!!111
puas sudah menanam ubi, nenas juga dibeli orang, puas sudah aku berbakti, pengganas juga dipandang orang

Quote:A true warrior need blood on his sword; A true pirate never afraid to sail the red sea.
Reply
01-02-2012, 09:47 AM,
Post: #9
RE: Programming Challenge 1 - Membina Segi Tiga
(01-02-2012, 09:12 AM)Ahlspiess Wrote: mana perl!!111

mana bash!!! GayFace
Reply
01-02-2012, 10:58 AM, (This post was last modified: 01-02-2012, 10:59 AM by s3m00t.)
Post: #10
RE: Programming Challenge 1 - Membina Segi Tiga
aku dah reply! Smile

(01-02-2012, 06:21 AM)th3phantom Wrote: ok dah pm bro!! GayFace

rupa tu dah ada. tapi kecurigaan wujud tanpa PoC. GayFace btw, kau kena fix lagi benda alah tu. nilai kelebaran yang kau masukkan sebenarnya lebar tapak piramid. bukan tinggi piramid tu. Smile

(01-02-2012, 09:08 AM)p0pc0rn Wrote: kalau cmni cane? ;d
[Image: 74651599346694298982.png]

PERL? Bash? Sad korang toksah mengada! banyak lagi korang tau, saja nak minta language yang aku tak tau. Auch

(01-02-2012, 09:12 AM)Ahlspiess Wrote: mana perl!!111

(01-02-2012, 09:47 AM)r3v3r7 Wrote: mana bash!!! GayFace


btw, @[thedanielaaa95] ajaklah ramai-ramai untuk @[try] mem@[biborn]kan soalan ini. ajak sekali @[rozalman] untuk cuba selesaikan soalan ini semudah 123 Big Grin
Reply
01-02-2012, 11:07 AM,
Post: #11
RE: Programming Challenge 1 - Membina Segi Tiga
kalut wt kja..cmni blehGayFace

// Stars(asterisk) pyramid perfectly packed into each space.
#include<iostream>
using namespace std;

int main()
{
int count = 0;

for (int width = 0; width <= 10; width++)
{
for (int alignLeft = width; alignLeft <= 15; alignLeft++)
{
cout << " ";
}
for (int space = 1; space < count; space++)
{
cout << "*";
}
cout << endl;
count += 2;
}
return 0;
}
Bollywood Challenge Accepted

[Image: 4AZhtKS.gif]
Reply
01-02-2012, 11:11 AM,
Post: #12
RE: Programming Challenge 1 - Membina Segi Tiga
tak boleh! kau tengok apa jadi kalau aku tukar nilai width kau. btw, segala PoC kena hantar dekat PM. nasib baik kau nye ni ada silap. Big Grin

[Image: 55295051314344061718.png]

(01-02-2012, 11:07 AM)paleyhacktech Wrote: kalut wt kja..cmni blehGayFace

// Stars(asterisk) pyramid perfectly packed into each space.
#include<iostream>
using namespace std;

int main()
{
int count = 0;

for (int width = 0; width <= 10; width++)
{
for (int alignLeft = width; alignLeft <= 15; alignLeft++)
{
cout << " ";
}
for (int space = 1; space < count; space++)
{
cout << "*";
}
cout << endl;
count += 2;
}
return 0;
}

Reply
01-02-2012, 11:13 AM, (This post was last modified: 01-02-2012, 11:13 AM by paley.)
Post: #13
RE: Programming Challenge 1 - Membina Segi Tiga
agk dh klut dok wt..jp enden settlekanGayFace
Bollywood Challenge Accepted

[Image: 4AZhtKS.gif]
Reply
01-02-2012, 11:13 AM,
Post: #14
RE: Programming Challenge 1 - Membina Segi Tiga
[Image: fadhilblackbox_026.png]

[Image: oh.png]
[̲̅ə̲̅٨̲̅٥̲̅٦̲̅]
i ℓ٥ﻻ ﻉ√٥υ F٥rﻉ√ﻉr ღ
|_|0|_|
|_|_|0|
|0|0|0|
http://jonhburn2.freehostia.com/lol.txt
Reply
01-02-2012, 11:17 AM,
Post: #15
RE: Programming Challenge 1 - Membina Segi Tiga
may i have your code? GayFace PM yerk. Smile

(01-02-2012, 11:13 AM)johnburn Wrote: [Image: fadhilblackbox_026.png]

[Image: oh.png]

Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Challenge - Paan 0b0x3d 7 885 11-12-2013, 02:42 AM
Last Post: JohnWhite
  TBD Challenge #1, Menang RM100 suhz 99 15,298 14-11-2013, 01:43 AM
Last Post: RFC792
  php reverse challenge lvl easy firdaushatta 10 1,111 25-07-2013, 02:18 AM
Last Post: firdaushatta
  [TBD Challenge] Data Forensic v0.0.0.0.0xXXXX1029939392 RFC792 24 2,821 06-07-2013, 07:12 PM
Last Post: RFC792
  Steganography Challenge suhz 35 2,964 04-07-2013, 01:18 PM
Last Post: Codeshift3r
  [TBD Challenge] Log Analysis Challenge #1 ak47suk1 15 1,591 01-07-2013, 11:00 PM
Last Post: shahril
  [PHP] Challenge Reverse This Function ! shahril 12 1,387 26-06-2013, 12:58 PM
Last Post: akif
  Firefly Challenge UnKn0wN 24 3,066 28-10-2012, 09:33 PM
Last Post: shadowmacx
  Wargames2012 Challenge Ahlspiess 26 4,957 21-07-2012, 06:19 PM
Last Post: kryp70
  Pijat challenge #1 pijat 5 1,315 20-06-2012, 11:05 PM
Last Post: kryp70

Forum Jump: