Sunday, March 21, 2010

57

5
4
7
6
1
0
3
2
13
12

  • Write a program to print the above sequence.

  • Logical Hint: Use bitwise operator.

    Program:
    int main()
    {
    int i;
    for(i=0;i<10;i++)
    {
    printf("%d",i^5);
    }
    return 0;
    }

    0 comments:

    Post a Comment