@deadlock
376 / 355 / 8
Регистрация: 14.12.2010
Сообщений: 1,265
|
17.12.2010, 10:03
|
|
C++ | 1
2
3
4
5
6
7
8
9
10
11
12
13
14
| #include <stdio.h>
int main(int argc, char *argv[])
{
int rost=0,age=0;
float k=0;
printf ("Vvedite rost: ");
scanf("%d",&rost);
printf ("Viberite vash vozrast: ");
scanf("%d",&age);
if (age<17) k=0.94;
else if (age>=17&&age<=25) k=1;
else if (age>25) k=1.09;
printf("Vash normalniy ves=%f",(float)k*rost-100.0);
} |
|
1
|