Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <time.h>
- int main(){
- srand(time(NULL));
- char hasilRandom[6];
- int temp;
- for(int i=0; i<5; i++){
- temp = rand()%(90-65+1)+65;
- hasilRandom[i] = (char)temp;
- }
- hasilRandom[5]=0;
- printf("%s", hasilRandom);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment