CopyPastehas never been so tasty!

distance

by anonymous

  • 0
  • 0
  • 0
105 views

#include "stdafx.h"
#include "stdio.h"
#include "conio.h"


int main()
{
    int x;
    printf("Input Distance:");
    scanf("%d",&x);

if (x <= 150)
{
    printf("Rocky");
}

else if (( x >= 151 ) && ( x <= 200 ))
{
    printf("Muddy");
}

else if (( x >= 201 ) && ( x <= 250 ))
{
    printf("Asphalt");
}

else if ( x >= 251 )
{
    printf("Conrete");
}

getch();
return 0;
}

Add A Comment: