Advertisement
Infernale

Pattern

Dec 7th, 2018
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void create(int n){
  4.     if(n==1){
  5.         printf("A");
  6.         return;
  7.     }
  8.     return create(n-1),printf("%c",64+n),create(n-1);
  9. }
  10.  
  11. int main(){
  12.     int tc,n;
  13.     scanf("%d",&tc);
  14.     for(int i=1;i<=tc;i++){
  15.         scanf("%d",&n);
  16.         printf("Case #%d: ",i);
  17.         create(n);
  18.         printf("\n");
  19.     }
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement