请帮我开发绘制嵌套方块C ++ [英] Please help me develop draw nested squares C++

查看:39
本文介绍了请帮我开发绘制嵌套方块C ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++对我来说是新手,我正在尝试解决这个问题,但却陷入困境。请帮帮我。下面是任务,之后我到目前为止。

C++ is new to me and I''m trying solve this problem but get stuck. Please help me out. Below is the task and after that is what i got so far.

展开 | 选择 | Wrap | 行号

推荐答案


C ++对我来说是新的,我正在尝试解决这个问题,但是卡住了。请帮帮我。下面是任务,之后我到目前为止。

C++ is new to me and I''m trying solve this problem but get stuck. Please help me out. Below is the task and after that is what i got so far.

展开 | 选择 | Wrap | 行号


我解释的方式可能不清楚。


基本上,我的意思是我们每条交叉线都有10个char *(从左到右)


第二条交叉线我们有2 *。 (循环到10,那些位置是0和9)


第四条交叉线我们有4 *(在循环到10,那些位置是0 2 7 9)

fith交叉线我们有6 *(在循环到10,那些位置是0 2 4 5 7 9)


所有这些我称之为的线顶部正方形(正方形有4个边:顶部,左边,右边,底部)和那些交叉线的对面,我称底部正方形边缘


我不知道如何制作一个循环,继续增加2个*

请帮助我。非常感谢!
The way I explained may not clear.

Basicly, I meant that we have 10 char * for each crossing lines (left to right)

The second crossing line we have 2 *. ( in loops to 10, position of those was 0 and 9)

The fourth crossing line we have 4 * ( in loops to 10, position of those was 0 2 7 9)
The fith crossing line we have 6 * ( in loops to 10, position of those was 0 2 4 5 7 9)

All of those lines I called Top Sides of squares ( Square have 4 sides: top, left, right, bottom) and Opposite of those crossing lines, I called Bottom Squares Sides

I don''t know how to make a loops that keep add on 2 more *
Please help me out. Thanks much!


好的,我运行了你的程序并得到了这个:
Ok, I ran your programme and got this:
< span class =codeLinkonclick =Blur(this,this.parentNode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


这篇关于请帮我开发绘制嵌套方块C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆