Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int last ;
- int i,j, a,T,k,m;
- scanf("%d",&T);
- last =T ;
- if(T>=1&&T<=25){
- for(k=0;k<T;k++){
- scanf("%d",&a);
- if(a>=1&&a<=80){
- for(i=1;i<=a*a;i++){
- if(T==k+1){
- for(m=1;m<=a*a;m++){
- printf("*");
- if(m==a*a){
- return 0 ;
- }
- if(m%a==0){
- printf("\n");
- }
- }
- return 0 ;
- }
- printf("*");
- if(i%a==0){
- printf("\n");
- }
- }
- }
- else{
- break ;
- }
- printf("\n");//you can stop this statement in order to find the approximate solution
- }
- }
- return 0 ;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement