游客 Signup | Login
中文 | En

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;
}

Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题