C examples for Data Type:float
Use math to increment your weight.
#include <stdio.h> #include <stdlib.h> int main()/*from w w w. java2s . com*/ { char weight[4]; int w; printf("Enter your weight:"); gets_s(weight); w=atoi(weight); printf("Here is what you weigh now: %d\n",w); w=w+1; printf("Your weight after the potatoes: %d\n",w); w=w+1; printf("Here you are after the mutton: %d\n",w); w=w+8; printf("And your weight after dessert: %d pounds!\n",w); return(0); }