Advertisement
sajib581

dimik_5

Mar 22nd, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include<stdio.h>
  2. int main(){
  3. int last ;
  4. int i,j, a,T,k,m;
  5.  
  6. scanf("%d",&T);
  7. last =T ;
  8. if(T>=1&&T<=25){
  9.  
  10. for(k=0;k<T;k++){
  11. scanf("%d",&a);
  12. if(a>=1&&a<=80){
  13. for(i=1;i<=a*a;i++){
  14. if(T==k+1){
  15. for(m=1;m<=a*a;m++){
  16. printf("*");
  17. if(m==a*a){
  18. return 0 ;
  19. }
  20. if(m%a==0){
  21. printf("\n");
  22. }
  23. }
  24. return 0 ;
  25. }
  26. printf("*");
  27.  
  28. if(i%a==0){
  29. printf("\n");
  30. }
  31.  
  32. }
  33. }
  34. else{
  35. break ;
  36. }
  37. printf("\n");//you can stop this statement in order to find the approximate solution
  38. }
  39. }
  40. return 0 ;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement