4002 - 入门第一次考试 第2题
第2题 文件名:图形2.cpp 要求:输出以下图形 * * * * *Input
Output
Examples
Input
no input needed
Output
* * * * *
Solution C
#include<stdio.h> int main( int argc, char **argv ) { int i; for( i = 0; i < 5; ++i ) printf( "*\n"); return 0; }
Solution C++
#include <iostream> using namespace std; int main( ) { cout<<'*'<<endl; cout<<'*'<<endl; cout<<'*'<<endl; cout<<'*'<<endl; cout<<'*'<<endl; return 0; }