Banner Ad

    A    L    W    A    Y    S           D    E    S    I    R    E           T    O           L    E    A    R    N           S    O    M    E    T    H    I    N    G           U    S    E    F    U    L   

Technology and business

technology and business are becoming inextricably interwoven. I don't think anybody can talk meaningfully about one without the talking about the other

Arthur C. Clarke

Any sufficiently advanced technology is indistinguishable from magic.

Bill Gates is a very rich man today... and do you want to know why? The answer is one word: versions.

Softwares

Defect-free software does not exist.

Technology is like a fish. The longer it stays on the shelf, the less desirable it becomes.

Sunday, May 22, 2011

IPE Lab 7B

#include <ncurses.h>
int printrectangle(int row, int col,int height,int width);
int eraserectangle(int row, int col,int height,int width);
int main()
{    
      int a,b=2,c=4,d=9;
      initscr();
      for(a=2;a<=80;a++)
      {
            printrectangle(a,b,c,d);
            refresh();
            for(int r=0;r<=30000;r++)    
            eraserectangle(a, b,c,d);
            refresh();

      }



      getch();
      endwin();


      return 0;
}
int printrectangle(int row, int col,int height,int width)
{
      for(int y=col;y<=col+height;y=y+height)
      {
            for(int x=row;x<=row+width;x++)
            {
            move(y,x);
            printw("*");

            }

      }

      for(int x=row;x<=row+width;x=x+width)
        {
                for(int y=col;y<=col+height;y++)
                {
                move(y,x);
                printw("*");

                }

        }



}

int eraserectangle(int row, int col,int height,int width)
{

        for(int y=col;y<=col+height;y=y+height)
        {
                for(int x=row;x<=row+width;x++)
                {
                move(y,x);
                printw(" ");

                }

        }

        for(int x=row;x<=row+width;x=x+width)
        {
                for(int y=col;y<=col+height;y++)
                {
                move(y,x);
                printw(" ");

                }

        }


}







 

Monday, May 9, 2011

2006 (MIT) final paper answers








2007 (MIT) final paper answers
















2008 (MIT) final paper answers









2009 (MIT) final paper answers










2010 (MIT) final paper answers









Related Posts Plugin for WordPress, Blogger...

your comments