heryvandoro

Untitled

Mar 5th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <time.h>
  5.  
  6. int main(){
  7. srand(time(NULL));
  8. char hasilRandom[6];
  9. int temp;
  10. for(int i=0; i<5; i++){
  11. temp = rand()%(90-65+1)+65;
  12. hasilRandom[i] = (char)temp;
  13. }
  14. hasilRandom[5]=0;
  15. printf("%s", hasilRandom);
  16. system("pause");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment