Skip to content

Instantly share code, notes, and snippets.

@nazt
Created July 17, 2009 05:28
Show Gist options
  • Select an option

  • Save nazt/148905 to your computer and use it in GitHub Desktop.

Select an option

Save nazt/148905 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i; int j;
char name[16];
int max;
i=1;
while(i<=10)
{
if(i==5)
{
++i;
continue;
}
printf ("%d ",i);
++i;
}
printf("\n");
for (i=1;i<=10;i++)
{
if(i==5)
continue;
printf("%d ",i);
}
printf("\n");
for(i=-4;i<=0;i++)
printf("%d \n",i);
//////////////////////
printf("Input Yourname : ");
scanf("%s",name);
printf("input times to print : ");
scanf("%d",&max);
for(i=max;i>=0;i--)
{
printf("#%d : %s \n",i,name);
}
//////////////////////
i=15;
while(i>0)
{
printf("%02d==",i);
j=i-1;
while(j>0)
{
printf("#");
--j;
}
printf("\n");
--i;
}
/////////////////////
for(i=1;i<=10;i++)
{
for(j=1;j<i;j++)
{
printf("%d",i-j);
if(i-j!=1)
printf("==");
}
printf("\n");
}
i=1;j=1;
while(i<=10)
{
j=1;
while(j<i)
{
printf("%d",i-j);
if(i-j!=1)
printf("==");
++j;
}
printf("\n");
++i;
}
/////////////////////
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment