Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Search Today's Posts Mark Forums Read
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-05-2005, 03:18 PM   #38
Unknown Hero
Home Sweet Abandonia

 
Join Date: Aug 2004
Location: Split, Croatia
Posts: 1,028
Default

Quote:
Originally posted by NrmMyth@Mar 5 2005, 06:05 PM
Take a look at this easy exam.
The input is the height of the piramide you have to print it.

Code:
height=4

 * **
 * * *
 ** * *
* * * *
You got the point.
Solved!!!


Code:
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
 * *int n,i,j;
 * *cin >> n;
 * * * for (i=n-1; i>=0; i--)
 * * * {
 * * * * * j=0;
 * * * * * while (j<i)
 * * * * * {
 * * * * * * * cout << " ";
 * * * * * * * j++;
 * * * * * }
 * * * * * while (j<n)
 * * * * * {
 * * * * * * * * cout << "*";
 * * * * * * * * cout << " ";
 * * * * * * * * j++;
 * * * * * }
 * * * * * cout << endl; * * * * * * * * 
 * * * }
 * *return 0;
}
Unknown Hero is offline                         Send a private message to Unknown Hero
Reply With Quote
 


Similar Threads
Thread Thread Starter Forum Replies Last Post
Discussion Of Exams Kon-Tiki Programming 8 30-03-2007 07:27 PM
How Often Do You Cheat On Exams / Tests nace Blah, blah, blah... 40 16-10-2006 07:57 PM
Solution To Exams Kon-Tiki Programming 0 08-08-2005 05:37 PM
Exams Unknown Hero Programming 0 12-04-2005 08:40 PM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 04:52 AM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.