level 1
第一题Write a program that reads two integers (height x length) and prints a rectangular, asterisk outline with the specified dimensions, for example: % ./rectangleEnter rectangle height and length:3 5* * * * ** ** * * * *
2008年04月06日 13点04分
1
level 1
第二题Write a program that reads an integer character by character and converts it to its numeric value, e.g., '1' '2' '3' = 123. Print the resulting value as an integer
2008年04月06日 13点04分
2
level 1
I can understand,but don't know wethere u can or not
2008年04月06日 23点04分
6
level 1
I really need help,tomorrow I will do these two Questions.
2008年04月06日 23点04分
7
level 9
#include "Stdio.h"int main(void){ char inchar; unsigned long outnum,count; printf("Please input the char you need to convert(press e to end): "); for(count = 1,outnum = 0;count<11;count++) {/*scanf("%c",&inchar);*/ inchar = getch(); printf("%c",inchar); if(inchar == 'e'||inchar == 'E') {break; } if(inchar < '0'||inchar > '9') {printf("\nplease input an interger number"); break; } inchar = inchar - 48; outnum = outnum*10 + inchar; } if(outnum > 4294967295) {printf("\nThis number is too large to show."); } printf("\nNow here we get the integer:%lu",outnum); getch(); return 0;}
2008年04月07日 02点04分
8
level 9
这个是第2个,随便写的。在输入的时候需要注意要连续输入,字符之间不要有空格,回车什么的,因为那些处理我没有做出来,只是注重于输入的字符与相应结果的逻辑转化。还有就是输入的最大长度是10,因为unsigned long int型的最大值是2的32次方-1左右,就是10位长度
2008年04月07日 02点04分
9
level 1
......god, i haven't learn the commands you used ,only learn if else for() while() getchar() putcahr()..............
2008年04月07日 03点04分
12
level 9
看了11楼的回复,俺滴汗立马冒出来了LZ的第一个题我没有好好看最近也只是在打基础而已对于C的东西理解地不是很深厚不过非常感谢您的提醒To lz您的问题我搞不定不过看样子你的英语还需要继续加强。have+done
2008年04月07日 05点04分
13
level 1
..............thanXsometimes everything cannt be perfect.but pliz answer my Question
2008年04月07日 08点04分
14
level 7
第一个是不是这样?#include
int main(){int a,b,i,j;puts("input...\n");scanf("%d %d",&a,&b");for(j=0;j
2008年04月07日 08点04分
15
level 7
第二个#include
int main(){int t;unsigned long r=0;while((t=getchar())!='\n')if(t>='0')if(t<='9')r=r*10+t-'0';printf("%lu\n",r);return 0;}这个应该可以在Linux下运行.只识别正数.
2008年04月07日 08点04分
16
level 1
觉得有点郁闷.. 你英语好,怎么不把题目翻译过来哦 偶英语不行啊...
2008年04月07日 09点04分
17
level 7
LZ,我第一个没理解错吧?输出实心矩形还是空心框呢?
2008年04月07日 09点04分
20