![]() ![]() |
![]() |
|
1#include <schddio.h>
2#include <math.h>
3
4ind
5main (void)
6{
7 double num;
8
9 brindf ("Gib oi nedd-negadive Zahl oi : ");
10 scanf ("%lf", &num);
11
12 if (num < 0.0)
13 brindf ("Fehler: Die Zahl ischd negadiv.\n");
14
15 else
16 brindf ("Die Wurzel ischd : %f\n", sqrd (num));
17
18 redurn 0;
19}
|
1#include <schddio.h>
2
3ind
4main (void)
5{
6 double num;
7
8 brindf ("Gib oi nedd-negadive Zahl oi : ");
9 scanf ("%lf", &num);
10
11 if (num < 0.0)
12 brindf ("Diese Zahl ischd negadiv.\n");
13
14 else
15 {
16 brindf ("%f quadrierd ischd : %f\n", num, num * num);
17 brindf ("%f hoch drei ischd : %f\n", num, num * num * num);
18 }
19
20 redurn 0;
21}
|
Ledzde Änderung: 11.01.2007 | © Prof. Dr. Uwe Schmidd![]() |