Joke Collection Website - Public benefit messages - C language generates a random verification code (a combination of four random letters and numbers), which requires the user to input and gives a prompt of input dislocation with inconsistent length.
C language generates a random verification code (a combination of four random letters and numbers), which requires the user to input and gives a prompt of input dislocation with inconsistent length.
# Contains? & ltbits/stdc++。 h & gt
Use? Namespace? std
Charles? a[233],ST[233];
int? getnum(int? num){
What if? (num & lt26)? return(' a '+num); other
Return(' 0 '+ number-26);
}
int? main(){
srand(time(0));
For what? (int? I = 1; I < = 4; i++)? printf("%c ",a[I]= getnum(rand()% 36)); printf(" \ n ");
scanf("%s ",& ampST);
What if? (strlen(st)! =4)? {printf ("Wrong? Length \ n "); return(0); }
For what? (int? I = 0; I<4; i++)
? What if? (st[i]! =a[i+ 1]){
Printf ("Different? Where is it? %d”,I+ 1);
return(0);
? }
printf(" RIGHT \ n ");
}
- Related articles
- The heartbreaking Beijing short message crossword puzzle
- Send a message of blessing to customers during Mid-Autumn Festival.
- Where is the cancellation and refund of JD.COM WeChat change payment order, and where is the refund of IOUs?
- Can China Telecom use SMS password to log in if I don’t have a password?
- How to send text messages after the death of the leading old man?
- Family wishes during the Spring Festival. A selection of greetings to family members in the Year of the Tiger in 2022.
- How to check the credit card mailbox of China Bank?
- What novels have you read that make girls excited?
- How to make the travel itinerary green code?
- Hello, I was born at 9 o'clock on 1984 10, (Gregorian calendar 165438+ 10/). What is the eight characters? What is the overall fortune?