![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
Need help printing "Hello" 7 characters high and 5 characters wideHi,
I just started learning C++ and I might be needing a lot of help so I decided to join this forum. The first problem am having is to try to print "HELLO" in big block letters where each letter is 7 characters high and 5 characters wide. I will greatly appreciate any help and I also need a mentor to help me in C++, whom I can send emails to when I have problems in programming. The code I have to print "Hello" is #include <iostream> using namespace std; int main() { cout << "Hello"; cin.get(); return 0; } P.S Please ignore previous thread. |
|||
|
#2
|
|||
|
|||
Re: Need help printing "Hello" 7 characters high and 5 characters wideQuote:
Unless, of course you just want to print a message "hard-coded" into the program. See footnote. So, what is the actual assignment? Regards, Dave Footnote: If it's OK to hard-code the message into the program, then open a text editor and manually build up the message. For example, I might want the message to look like the following: Code:
Each character is 5x7, and there are two blank columns between characters. Now if this is what you want, then just put a cout << /* something goes here */ << endl; statement for each of the seven lines of the message. |
|
#3
|
||||
|
||||
Re: Need help printing "Hello" 7 characters high and 5 characters wideQuote:
__________________
During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence? |
|
#4
|
||||
|
||||
Re: Need help printing "Hello" 7 characters high and 5 characters wideYeah dave, I think it is just a first assignment to get used to writing code. This is pretty easy, Emmy. All you should have to do is break the block letters into lines, and print the lines one at a time like dave's post shows.
For example: CPP / C++ / C Code:
__________________
-Aaron |
|
#5
|
|||
|
|||
Re: Need help printing "Hello" 7 characters high and 5 characters wideThanks guys, I think Dave is right. I got the assignment from a C++ book am using, I was thinking there might be some code that enlarges print statements. That answers my question. Once again thanks.
Emmy |
Recent GIDBlog
Toyota - 2009 May Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The