Warning: mkdir(): No space left on device in /var/www/hottg/post.php on line 59

Warning: file_put_contents(aCache/aDaily/2025-07-22/post/C_Codings/--): Failed to open stream: No such file or directory in /var/www/hottg/post.php on line 72
128. Pattern @C Language 👨‍💻
TG Telegram Group & Channel
C Language 👨‍💻 | United States America (US)
Create: Update:

128. Pattern

1
3 2
4 5 6
10 9 8 7
11 12 13 14 15
21 20 19 18 17 16


#include<stdio.h>
int main()
{
int i,j,k,l,n;

scanf("%d",&n);

for(k=i=1;i<=n;i++)
{
l=k+i-1;
for(j=1;j<=i;j++)
{
if(i%2==1)
printf("%d ",k);
else
printf("%d ",l);
k++;
l--;
}
printf("\n");
}
return 0;
}
#program_by : @aShish_bhushan

128. Pattern

1
3 2
4 5 6
10 9 8 7
11 12 13 14 15
21 20 19 18 17 16


#include<stdio.h>
int main()
{
int i,j,k,l,n;

scanf("%d",&n);

for(k=i=1;i<=n;i++)
{
l=k+i-1;
for(j=1;j<=i;j++)
{
if(i%2==1)
printf("%d ",k);
else
printf("%d ",l);
k++;
l--;
}
printf("\n");
}
return 0;
}
#program_by : @aShish_bhushan


>>Click here to continue<<

C Language 👨‍💻




Share with your best friend
VIEW MORE

United States America Popular Telegram Group (US)


Warning: Undefined array key 3 in /var/www/hottg/function.php on line 115

Fatal error: Uncaught mysqli_sql_exception: Too many connections in /var/www/db.php:16 Stack trace: #0 /var/www/db.php(16): mysqli_connect() #1 /var/www/hottg/function.php(212): db() #2 /var/www/hottg/function.php(115): select() #3 /var/www/hottg/post.php(351): daCache() #4 /var/www/hottg/route.php(63): include_once('...') #5 {main} thrown in /var/www/db.php on line 16