博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
程序输出字符乱码为正方形_C程序使用字符*打印下面的正方形
阅读量:2506 次
发布时间:2019-05-11

本文共 620 字,大约阅读时间需要 2 分钟。

程序输出字符乱码为正方形

#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,n;
clrscr(); //to clear the screen
printf(“Enter size of the square:”);
scanf(“%d”,&n);
for(i=0;i<n;++i)
{
printf(“n”);
for(j=0;j<n;++j)
{
if(i==0||i==n-1||j==0||j==n-1)
printf(“*”);
else
printf(” “);
}
}
getch(); //to stop the screen
}
#include<stdio.h>
#include<conio.h>

void main()
{
int i,j,n;
clrscr(); //to clear the screen
printf(“Enter size of the square:”);
scanf(“%d”,&n);
for(i=0;i<n;++i)
{
printf(“n”);
for(j=0;j<n;++j)
{
if(i==0||i==n-1||j==0||j==n-1)
printf(“*”);
else
printf(” “);
}
}
getch(); //to stop the screen
}

翻译自:

程序输出字符乱码为正方形

转载地址:http://frwwd.baihongyu.com/

你可能感兴趣的文章
找老鼠啊~亏了还是赚了?
查看>>
注意Hibernate4在开发当中的一些改变
查看>>
关于vue的源码调试
查看>>
[读书笔记]java核心技术
查看>>
js 不要使用new
查看>>
g++使用container_of编译不通过
查看>>
如何用Python为你的邮箱加油?还有这种操作!
查看>>
fir.im Weekly - 8 个不能错过的 iOS / Android 技术分享
查看>>
cdoj1324暴力分块
查看>>
读《孤独六讲》
查看>>
《那些年啊,那些事——一个程序员的奋斗史》——118
查看>>
POJ 3320 Jessica's Reading Problem (尺取法)
查看>>
约瑟夫环·
查看>>
IE常见的兼容处理
查看>>
浅析JavaScript工厂模式
查看>>
003.第一个动画:绘制直线
查看>>
vc中的获取时间方式,struct time和time_t(转自百度空间)
查看>>
RabbitMQ核心概念和常规使用方式
查看>>
Java entry
查看>>
es6特性
查看>>