.

Thursday, February 28, 2013

Hemnat

NAME- HEMANT KALIA
HUMBER ID-821-364-569
USER ID klhm0005

Problem Set 1

QUESTION.1)

/*
The Tank goes virtually separately contend as long as grid is 9x9.The ice chest After moving along the wall should end in grid 9th facing in the East direction.
*/

# implicate <stdio.h>
#include <tank.h>
#include <supertank.

Ordercustompaper.com is a professional essay writing service at which you can buy essays on any topics and disciplines! All custom essays are written by professional writers!

>

/*
The tank moves by the side of wall in the upward direction after turning left which is its starting signal position
*/
void moveupWall()
{
turnLeft();
while ( rightIsBlocked() )
{
move();
}
turnRight();
egest;
}

void MoveFront()
{
while ( frontIsClear() )
{
move();
}
return;
}

//Moves down by the sides of wall
void movedownWall()
{
turnRight();
MoveFront();
turnLeft();
return;
}

//moves around the wall full from upward to downword
void turnAroundWall()
{
moveupWall();
move();
movedownWall();
return;
}

int main( )
{
/*
To traverse walls of a base that is 9 avenues long, we move
forward or go around a wall 8 times.
*/
for (int i = 0; i < 8; i++)
{
if ( frontIsClear() )//Checks if there is blockage infront
{
move();
}
else
{
turnAroundWall();
}
}

return 0;
}

QUESTION.2)

/* The purpose of this program is to Create an entire pass of flares along first street.
buildEmergencyRunway() can be called on any street as long as the tank is facing east to
start.Thus should end when the street finishes by droping flare in the give out grid too
*/

#include <stdio.h>
#include <tank.h>
#include...If you want to get a full essay, order it on our website: Ordercustompaper.com



If you want to get a full essay, wisit our page: write my paper

No comments:

Post a Comment