donmike25

tutorial 8(3)

Aug 23rd, 2013
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(){
  5.  
  6. char str[50];
  7. int i,num;
  8.  
  9. printf("Please enter a string: ");
  10. gets(str);
  11. printf("Please enter the number of times you want to display: ");
  12. scanf("%d",&num);
  13.  
  14. for (i=0;i<num;i++)
  15. puts(str);
  16.  
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment