jituTechnology

jituTechnology

Write a Program for Ratio of Height To weight

/*A program that ask user to input height in feet and inch, and weight in Kg and then convert height in inch and then in
to meter. Apter then convert height to meter and finally calculate the ratio of height to weight.
programmed by:
Name: Jitendr Yadav
Roll:16
Date:11 jan 2011 */
#include <stdio.h>
#include <conio.h>
#include <math.h>
void main()
{
int ft,in;
float m,ratio,Kg;
printf(“Enter your height in feet and inches\n”);
scanf(“%d%d”,&ft,&in);
printf(“Enter your weight in Kilogram:”);
scanf(“%f”,&Kg);
in=in+(ft*12);
m=in*0.0254;
ratio=Kg/pow(m,2);
printf(“The ratio of your height in meter(m) to weight in kilogram(Kg)= %f”,ratio);
getch();
}

No comments yet.

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

October 2026
S M T W T F S
 123
45678910
11121314151617
18192021222324
25262728293031