这个题怎么搞?一上午了硬是没做出来..
c++吧
全部回复
仅看楼主
level 1
米兰R10 楼主
输出....*...**..***.*********
2008年07月28日 02点07分 1
level 0
呵呵
2008年07月28日 02点07分 2
level 0
#include "iostream.h" int main() { cout<<"....*\n...**\n..***\n.****"<
2008年07月28日 02点07分 3
level 1
米兰R10 楼主
忘了说了..要用循环....
2008年07月28日 02点07分 4
level 2
#include
using namespace std;int main() {while(1){ cout<<"....*\n...**\n..***\n.****"<
2008年07月28日 05点07分 5
level 2
当然,你希望的答案应该是两个循环套起来的for(){ for() {}}自己再想想吧
2008年07月28日 05点07分 6
level 0
#include
#include
using namespace std;int main(){ string t=""; for(int i=1;i<6;i++) { t+="*" ; cout<
2008年07月28日 05点07分 7
level 0
for(int i=0;i<5;i++){ for(int j=0;j<5;j++) { if(i+j<4)cout<<"."; else cout<<"*"; } cout<
2008年07月28日 08点07分 8
level 1
米兰R10 楼主
嗯..对了...谢谢大家...原来是要用if语句...我竟然没想到..
2008年07月28日 09点07分 9
level 1
#include
using namespace std;void InputStar(int num){for(int i=0;i
=0;i--){InputSpace(i); InputStar(5-i);cout<
2008年07月29日 04点07分 10
level 1
又晚来一步 我也来一个!
2008年07月29日 06点07分 11
level 1
#include
using namespace std;int main(){ int i,j,k,line; cout<<"请输入行数"<
>line; for(i=1;i<=line;i++) {for(j=1;j<=line-i;j++) cout<<" "; for(k=line-i;k
2008年07月29日 06点07分 12
level 0
这个呢?#include
using namespace std;int main(){ for(int j=4;j>=0;j--){ int k=1; for(;k<=j;k++)cout<<"."; for(k=1;k<=5-j;k++)cout<<"*"; cout<<"\n"; } return 0;}
2008年07月29日 15点07分 13
level 0
3楼的最好 5楼的搞笑 这题用循环纯粹是找麻烦
2008年08月03日 15点08分 14
level 1
回LS的,如果人家让你输出100*100的矩阵或者让你输出指定行列数的矩阵,你还能说3L的最好吗?
2008年08月04日 01点08分 15
level 0
那人家让你输出100×100的矩阵了么
2008年08月04日 04点08分 16
level 0
#include
using namespace std;int main(){int i,j,k;int rows;cin>>rows;for(i=1;i<=rows;i++){j=rows-i;for(k=1;k<=j;k++)cout<<".";for(;k<=rows;k++)cout<<"*";cout<
2008年08月05日 08点08分 17
level 1
弄个奇怪的没有if,不用=#include
#define N 5int main(void){ char a[7]={0},*_=a;_+=2;*_+=7; while(*_){ --_;*_+=6;--_;*_+=7;_+=2;--*_; }_+=4;*_=10;_-=6;*_-=3;_+=2;*_=N; while(*_){ while(*_){ ++_;++*_;++_;++*_;++_;++*_; _-=3;--*_;} ++_;--*_; while(*_){ _-=3;putchar(*_);_+=3;--*_;} ++_;*_-=N+1; while(*_){ _-=3;putchar(*_);_+=3;++*_;} ++_; while(*_){ _-=3;++*_;_+=3;--*_;} ++_;putchar(*_);_-=4;--*_; } return 0;}
2008年08月05日 09点08分 18
level 1
#include
#define  N  5int  main(void){                                char                                    a[7]                                        ={0},                                            *_=a;                                                _+=2;*_+=7;while(*_){--_;*_+=6;--_;*_+=7;_+=2;--*_;}_+=4;                *_=10;_-=6;*_-=3;_+=2;*_=N;while(*_)                {while(*_){                                ++_;++*_;                ++_;++*_;++                                _;++*_;_                -=3;--*_;}                                  ++_;--*_;                while(*_){_-=3;putchar(*_);_+=3;--*_;}                                                  ++_;                                              *_-=N+1;                                while      (*_){      _-=3;                        putchar          (*_);          _+=3;++*_;}                ++_;while              (*_){                _-=3;++*_;        _+=3;--*_;}                  ++_;                          putchar(*_);      _-=4;--                                *_;                                }getchar();                                        return  0;}
2008年08月05日 09点08分 19
level 1
#include
#define  N  5int  main(void){                                char                                    a[7]                                        ={0},                                            *_=a;                                                _+=2;*_+=7;while(*_){--_;*_+=6;--_;*_+=7;_+=2;--*_;}_+=4;                *_=10;_-=6;*_-=3;_+=2;*_=N;while(*_)                {while(*_){                                ++_;++*_;                ++_;++*_;++                                _;++*_;_                -=3;--*_;}                                  ++_;--*_;                while(*_){_-=3;putchar(*_);_+=3;--*_;}                                                  ++_;                                              *_-=N+1;                                while      (*_){      _-=3;                        putchar          (*_);          _+=3;++*_;}                ++_;while              (*_){                _-=3;++*_;        _+=3;--*_;}                  ++_;                          putchar(*_);      _-=4;--                                *_;                                }getchar();                                        return  0;}
2008年08月05日 09点08分 20
1 2 尾页