-
I have done dozens of questions, and I feel that it is very suitable for ACM beginners.
Moreover, there are more questions in the Chinese taste forum, and the discussion is relatively hot.
-
I'm gone, too, to whom do you give it?
-
#include
main()
char a[100];
int b,c,d,i,j;
while(gets(a)) is replaced by getsif(a[0]==0) If it is a blank line, continue with a line break.
if(a[0]>=a'&&a[0]<=z') printf("%c",a[0]-32);If the first letter is lowercase, the output is uppercase.
else printf("%c",a[0]);Otherwise, the initials are output directly.
for(i=1;i<100;i++)
if(a[i]==32) if it is a space.
if(a[i+1]>=a'&&a[i+1]<=z') a[i+1]=a[i+1]-32;If the next letter is lowercase, replace it with uppercase.
if(a[i]==0'If you encounter an end of line.
break;Exit the loop.
printf("%c",a[i]);Otherwise, this character is printed.
printf("");
-
while() is wrong、、、 should be changed to while(gets(a)).
-
#include
void main()
if(i==1)
elseif(s[j]<10)printf("0%d",s[j]);
else printf("%d",s[j]);
/printf("\b");I think it's mainly because of this sentence.,You can consider saving the number of eligible people first.,This is changed on the basis of your program.,Don't use this sentence.,ac}}
-
#include
int main()
I was bored and wrote a simple one, if you want to solve multiple sets of data at once, lz can be rewritten with arrays.
-
scanf("%s",&a), this sentence is problematic, first of all, %s should have one'0' terminator, whereas a has only one character. It's also wrong to use %c, because there's a carriage return and a space will be read in. There will be an error in that case.
So define a as an array. Also, you need to pay special attention to the test array with a blank line between them, which means that the blank line must be printed at the beginning of each time. Because you don't know when the test data is over.
Finally, why would you want to define an array? That wastes storage space and adds time complexity.
#include
int main()
elsescanf("%d",&n);
for(i=0;i}else
printf("");}
-
scanf("%s",&a)==1&&a!='@这句都有问题哦, it is recommended to modify the **, a is char, to use %c; Then read the next question carefully.
-
Alas, I also read your ** for a long time, there is no problem at all, and later I found out that it was correct, and when the output ok was uppercase, it was all uppercase letters.
printf("ok");That's right.
-
Sort it by blistering in ascending order.
#include
void main()
for (i=0; iif (i
Agree with the statement upstairs, the first floor is obviously not Hangzhou Electric's, Hangzhou TV University? I haven't heard of it, maybe it's affiliated with Hangzhou Electric? Hehe. >>>More
This is a very rubbing of AC in the past** I don't know if it can help you. >>>More
Miss, if you believe me, you will buy Spalding, the price is about 80 90 yuan RMB, because we usually play on the cement floor, so you can't buy too good, in addition, you have to touch the leather of the ball when you buy the ball, it is best to be more frictional, so it is more comfortable to play. I've been playing for 6 years, and that's how I usually buy it. >>>More
Where are you located?
CPU Core E6300 Loose Chip 996 Plus Fan 30Yuan Motherboard GA-P35-S3 890 >>>More