nyoj 822-画图 (*)
生活随笔
收集整理的這篇文章主要介紹了
nyoj 822-画图 (*)
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
822-畫圖
內(nèi)存限制:64MB
時(shí)間限制:1000ms
特判: No
通過數(shù):133
提交數(shù):187
難度:0
題目描述:
計(jì)算機(jī)畫圖也挺有趣的哈!那我們就來用計(jì)算機(jī)畫幅圖吧。。。
輸入描述:
輸入一個(gè)正整數(shù)N(0<N<=10),表示要輸出的正方形的邊上*的個(gè)數(shù)
輸出描述:
輸出一個(gè)滿足題意的正方形
樣例輸入:
復(fù)制
4
樣例輸出:
****
****
****
****
C++:
#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <stack>
#include <set>
#include <map>
#include <queue>
#include <climits>
#include <bitset>
#define PI 3.1415926 using namespace std; int main()
{
int n, k;
cin >>n;
for (int i = ; i <= n; ++ i)
{
for (int j = ; j <= n; ++ j)
printf("*");
printf("\n");
}
return ;
}
總結(jié)
以上是生活随笔為你收集整理的nyoj 822-画图 (*)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: web公选课js基础Part1
- 下一篇: jsp与spring mvc后台cont