English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i'm a first year computer science student and i'm having a hard time in making my project for "Programming 1". Can anyone give me a complete code of a c++ program that has an output of any x'mas decoration using LOOP. I would really appreciate your support in my times of hardships. Thank you.

2007-01-03 21:18:31 · 4 answers · asked by Pintoy 2 in Computers & Internet Programming & Design

4 answers

Please give us the code you have so far.
///

2007-01-03 21:29:02 · answer #1 · answered by jan 7 · 2 1

nicely even i conflict together as doin those trend issues....too undesirable i dont bear in suggestions the code....yet u will desire one loop for the 5 rows....u can see tht the style of letters are equivalent to the style of row....i.e a is 1time and it incredibly is in 1st row...b is in 2d row n it incredibly is two circumstances....tht is the best judgment tht u hav to prepare... so u desire a loop to alter the row,one loop for printing the alphabets....it incredibly is the answer to the 1st trend....further u can clean up the 2d trend...

2016-10-29 23:20:15 · answer #2 · answered by bonanno 4 · 0 0

#include

main()
{
int x = 0, p=1;
cout<<"\t\t | |";
cout<<"\n";
cout<<"\t\t\t\\ /";
cout<<"\n";
cout<<"\t\t\t O";
cout<<"\n";
cout<<"\t\t\t *";
cout<<"\n";
while (p != 6)
{
if (x==0)
{
cout<<"\t\t\t";
}
else if(x==1)
{
cout<<"\t\t ";
}
else if(x==2)
{
cout<<"\t\t ";
}
else if(x==3)
{
cout<<"\t\t ";
}
else if(x==4)
{
cout<<"\t\t ";
}
else
{
cout<<" ";
}
for(x = 0; x < p; x++)
{
cout<<" #";
}
p = p + 1;
cout<<"\n";
}
p = 2;

cout<<"\t\t\t";
for(x = 0; x {
cout<<"| ";
}
cout<<"\n\t\t ";
for(x = 0; x<5; x++)
{
cout<<"_";
}
}

Highlight everything then (ctrl + C) then paste it in your program. Warning: Every single character in the codes are important. Just do a bit of debugging if there are errors in it.

2007-01-03 22:37:36 · answer #3 · answered by red scar 2 · 0 0

How about you post what you have and ask why it isn't working. It just wouldn't be right for us to do your homework for you, would it?

2007-01-03 21:20:10 · answer #4 · answered by BigRez 6 · 0 0

fedest.com, questions and answers