Day 4 HW

// Selections // PRINTS OUT 753

#include <stdio.h>

void main()
{
  int a = 750;
 
  if(a > 750)
  {
    if (a >= 1000)
    {
      a = 0;
    }
    else
    {
      if (a < 500)
      {
        a *=2;
      }
      else
      {
        a *=10;
      }
    }
  }
  else
  {
      a += 3;
  }
 
  printf(" %4.1d \n", a);
 
}

Comments

Popular posts from this blog

Day 3 Mods and HW

10/17/2017 Motor w/ Potentiometer