One question per day 69

Question 69: Enter a character string (with no more than 20 in length and no spaces) on the keyboard, copy it, and convert all lowercase letters to uppercase letters when copying. Insert picture description here
#include <stdio.h>
void main()
{ char a[20]; int i; printf("Please enter a string of English letters:\n"); gets(a); for (i=0 ;i<20;i++) if(a[i]>='a'&&a[i]<='z') a[i]-=32; a[20]='\0'; puts(a) ; }









Guess you like

Origin blog.csdn.net/drake_gagaga/article/details/114108104