Commit 3dc17670 authored by Matthias Braun's avatar Matthias Braun
Browse files

reindenting source

parent c5603c15
#include <stdio.h>
int main()
{
int i, n=3 , v, dig, set;
{
int i, n=3 , v, dig, set;
//printf ("Enter n: ");
//scanf ("%d", &n);
//printf ("Enter n: ");
//scanf ("%d", &n);
v = 1 << n;
v = 1 << n;
for (i=0; i < v; i++) {
set = i ^ (i>>1);
for (i=0; i < v; i++) {
set = i ^ (i>>1);
printf(" i: %d set: %d \n",i,set);
for (dig=1 << (n-1); dig; dig >>= 1)
{
printf("\ni: %d v: %d dig: %d set:%d\n",i,v,dig, set);
printf (" %d", ((set & dig) ? 1 : 0));
printf("\ni: %d v: %d dig: %d set:%d\n",i,v,dig, set);
printf(" i: %d set: %d \n",i,set);
for (dig=1 << (n-1); dig; dig >>= 1)
{
printf("\ni: %d v: %d dig: %d set:%d\n",i,v,dig, set);
printf (" %d", ((set & dig) ? 1 : 0));
printf("\ni: %d v: %d dig: %d set:%d\n",i,v,dig, set);
}
printf ("\n");
}
printf ("\n");
}
return 0;
}
return 0;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment