User:Inge Hoonte/arduino2: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
 
Line 8: Line 8:
  {
  {
  while (j < 13)
  while (j < 13)
{
{
  while (i < 16)
  while (i < 16)
{
{
printf("%c %c\n", pat[i], pat[(i+j)%16]);
printf("%c %c\n", pat[i], pat[(i+j)%16]);
i = i+1;
i = i+1;
}
}
i = 0;
i = 0;
j = j+1;
j = j+1;
}
}
  }
  }

Latest revision as of 19:17, 8 November 2010

#include "stdio.h"

char pat[]="wow this is hard ";
int i = 0;
int j = 0;

int main ()
{
	while (j < 13)	
	{
			while (i < 16)
			{
					printf("%c %c\n", pat[i], pat[(i+j)%16]);
					i = i+1;
			}
			i = 0;
			j = j+1;
	}
}