Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6. int indexnumber;
  7. char bloodtype;
  8. float weight,height;
  9.  
  10. printf("Enter Your Index Number:- ");
  11. scanf("%d",&indexnumber);
  12.  
  13. printf("Enter your Bloodtype:- ");
  14. scanf(" %c",&bloodtype); // put a one space before the format specifier for clearing the buffer.
  15.  
  16. printf("Enter Your Weight:- ");
  17. scanf("%f",&weight);
  18.  
  19. printf("Enter Your Height:- ");
  20. scanf("%f",&height);
  21.  
  22. printf("\nBody condition details of index number %d\n"
  23. "-----------------------------------------\n"
  24. "Blood type: %c\n"
  25. "weight: %.2f\n"
  26. "Height: %.2f\n",indexnumber,bloodtype,weight,height);
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement