For循环帮助 [英] For loops help
问题描述
亲爱的大家,
有人可以帮助我帮助我。我正在尝试写一个程序
,它将显示以下内容:
*
*** >
*****
*******
*********
*********
*******
*****
***
*
我很难为这个编写代码。我尝试了几次
次,但我无法让它正常工作。我住在日本,我拿了一个在线C ++课程
。导师住在美国,所以每当我醒来时,他就睡着了。因此,当我需要帮助时,我无法直接与他联系。我必须尽快启动并运行该程序。我试着在每个地方寻求帮助,但是除了这个小组之外没有其他的东西。
我的教科书也没什么帮助。我将非常感谢
我将获得的帮助!
Dear everyone,
Can someone please help me on my HW. I''m trying to write a program
that will display the following:
*
***
*****
*******
*********
*********
*******
*****
***
*
I''m having a hard time writing a code for this one. I tried several
times, but I can''t get it to work properly. I live in Japan and I take
an online C++ course. The instructor lives in the US so whenever I am
awake, he''s asleep. Therefore, I cannot contact him directly when I
need help. I have to get this program up and running ASAP. I tried
searching everywhere for help, but there''s none except for this group.
My textbook isn''t much of a help either. I WILL GREATLY APPRECIATE THE
HELP I WILL GET!
推荐答案
pa *********** @ gmail.com 写道:
亲爱的大家,
有人可以帮我解决我的问题。我正在尝试编写一个显示以下内容的程序:
*
***
*****
** *****
*********
*********
*******
**** *
***
*
我很难为这个编写代码。我试了好几次,但我不能让它正常工作。我住在日本,我参加了一个在线C ++课程。导师住在美国,所以每当我醒着,他就睡着了。因此,当我需要帮助时,我无法直接与他联系。我必须尽快启动并运行该程序。我试着到处搜寻寻求帮助,但除了这个小组之外没有其他的东西。
我的教科书也没什么帮助。我将非常感谢我将获得的帮助!
Dear everyone,
Can someone please help me on my HW. I''m trying to write a program
that will display the following:
*
***
*****
*******
*********
*********
*******
*****
***
*
I''m having a hard time writing a code for this one. I tried several
times, but I can''t get it to work properly. I live in Japan and I take
an online C++ course. The instructor lives in the US so whenever I am
awake, he''s asleep. Therefore, I cannot contact him directly when I
need help. I have to get this program up and running ASAP. I tried
searching everywhere for help, but there''s none except for this group.
My textbook isn''t much of a help either. I WILL GREATLY APPRECIATE THE
HELP I WILL GET!
发布您的一些尝试。没有人会给你
解决方案。另外,请阅读下面的链接,特别是在谈到如何询问家庭作业问题的时候(或链接):
http://www.clc-wiki.net/wiki/Introdu...to_comp.lang.c
我可以提供一种解决方案,但我怀疑那是'你在寻找什么
for:
#include< stdio.h>
int main(无效)
{
int i;
for(i = 0; i< 1; i ++)
{
printf(" * \ n");
printf(" *** \ n");
printf(" ***** \ n");
printf(" ******* \ n");
printf(" ********* \ n");
printf(" ********* \ n");
printf(" ******* \ n" );
printf(" ***** \ n");
printf(" *** \ n");
printf(" * \ n");
}
返回0;
}
Post some of the attempts you have made. Nobody will just give you the
solution. Also, read the link below, especially where it talks about
(or links to) how a homework question should be asked:
http://www.clc-wiki.net/wiki/Introdu...to_comp.lang.c
I can offer one solution, though I doubt that''s what you''re looking
for:
#include <stdio.h>
int main(void)
{
int i;
for (i=0; i<1; i++)
{
printf(" *\n");
printf(" ***\n");
printf(" *****\n");
printf(" *******\n");
printf("*********\n");
printf("*********\n");
printf(" *******\n");
printf(" *****\n");
printf(" ***\n");
printf(" *\n");
}
return 0;
}
pa ********* **@gmail.com 写道:
pa***********@gmail.com wrote:
有人可以帮我解决我的问题。我正在尝试编写一个显示以下内容的程序:
(剪切星号)
我很难写这个代码的时间。我试了好几次,但我不能让它正常工作。
发布您的最佳尝试。我们会修复你的代码,但我们不会为你写它
。
我住在日本我接受了一个在线C ++课程。
Can someone please help me on my HW. I''m trying to write a program
that will display the following:
(snip asterisks)
I''m having a hard time writing a code for this one. I tried several
times, but I can''t get it to work properly.
Post your best attempt. We''ll fix your code, but we won''t write it
for you.
I live in Japan and I take
an online C++ course.
并发布到正确的新闻组。 comp.lang.c ++就是这样---->
-
Christopher Benson-Manica |我*应该*知道我在说什么 - 如果我
ataru(at)cyberspace.org |不,我需要知道。火焰欢迎。
And post to the correct newsgroup. comp.lang.c++ is that way ---->
--
Christopher Benson-Manica | I *should* know what I''m talking about - if I
ataru(at)cyberspace.org | don''t, I need to know. Flames welcome.
pa ****** *****@gmail.com 写道:
pa***********@gmail.com wrote:
有人可以帮我解决我的问题。我正在尝试编写一个显示以下内容的程序:
*
***
*****
** *****
*********
*********
*******
**** *
***
*
#include< stdio.h>
int main(void)
{
put(" *");
puts(" ***");
put(" *****");
puts(" *******");
puts(" ; *********");
put(" *********");
puts(" ; *******");
put(" *****");
puts(" ***" );
puts(" *");
puts("");
puts(" Copyright 2006 Richard L. Bos - 保留所有权利。;;
返回0;
}
我有一个很难为这个编写代码。我试了好几次,但我不能让它正常工作。我住在日本,我参加了一个在线C ++课程。
然后a。你想要替换< stdio.h>类似于< cstdio.h ++> ;;
b。你想要像stdout<<而不是puts(;和c。你需要
在comp.lang.c ++中询问,而不是comp.lang.c.
指导员住在美国所以每当我醒了,他已经睡着了。
因此,当我需要帮助时,我无法直接与他联系。
他们在美国没有电子邮件天哪。我知道这个国家在某些方面有点原始,但这确实是倒退。
我必须尽快启动并运行这个程序。
Can someone please help me on my HW. I''m trying to write a program
that will display the following:
*
***
*****
*******
*********
*********
*******
*****
***
*
#include <stdio.h>
int main(void)
{
puts(" *");
puts(" ***");
puts(" *****");
puts(" *******");
puts("*********");
puts("*********");
puts(" *******");
puts(" *****");
puts(" ***");
puts(" *");
puts("");
puts("Copyright 2006 Richard L. Bos - all rights reserved.");
return 0;
}
I''m having a hard time writing a code for this one. I tried several
times, but I can''t get it to work properly. I live in Japan and I take
an online C++ course.
Then a. you want to replace <stdio.h> with something like <cstdio.h++>;
b. you want something like stdout << instead of puts(; and c. you need
to ask in comp.lang.c++, not comp.lang.c.
The instructor lives in the US so whenever I am awake, he''s asleep.
Therefore, I cannot contact him directly when I need help.
They don''t have e-mail in the US? Gosh. I knew that country was a bit
primitive in some aspects, but that''s truly backwards.
I have to get this program up and running ASAP.
我真的非常怀疑。
FWIW:DYODH。HTH; HAND。
>
Richard
I really, really doubt that.
FWIW: DYODH. HTH; HAND.
Richard
这篇关于For循环帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!