1.
#include<stdio.h>
#define GALLON 3.785#define MILE 1.609
int main(void)
{
float mile,gallon;
printf("Please input miles and gallons:");
scanf("%f%f",&mile,&gallon);
printf("Mile per gallon:%.1f\n",mile/gallon);
printf("Litres per 100 kilometre:%.1f\n",
gallon*GALLON/(100*mile*MILE));
return 0;
}
2.
#include<stdio.h>
int main(void)
{
float height;
char name[20];
printf("Please input your height by inches:\n");
scanf("%f",&height);
printf("Please input your name:\n");
scanf("%s",name);
printf("%s,you are %f feet tall.\n",name,height);
return 0;
}