-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlesson4.c
More file actions
28 lines (27 loc) · 704 Bytes
/
lesson4.c
File metadata and controls
28 lines (27 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//write a program to find out heavyist person from two given person weight in kilogram
#include<stdio.h>
#include<conio.h>
void main()
{
float weight1,weight2;
printf("enter first person weight");
scanf("%f",&weight1);
printf("enter 2nd person weight");
scanf("%f",&weight2);
if(weight1==weight2)
{
printf("both persons weight is same");
}
else
{
if(weight1>weight2) //< > <= >= == !=
{
printf("first person is heaviest person and his weight is %f",weight1);
}
else
{
printf("second person is heaviest person and his weight is %f",weight2);
}
}
printf("\n good bye");
}