Language Turbo C 2.0 Extern functions */ #include <conio.h> #include <stdio.h> /* Declaration of functions */ a (); b (); c (); v (); w (); x (); d (float); float j (float); float k (float); s (int *); t (int *); y (const char *); float g = 3.141592653589; /* number 'pi' */ main () { int m; float p; printf ("47.4. "); a (); b (); c (); m = 5; printf ("47.5. "); d (m); printf ("49.6. Length of circle of radius %i equals %.4g.\n", m, j (m)); p = 5.2; printf ("100.29. Square of number %g is equal to %g.\n", p, k (p)); m = 10; s (&m); m = 10; t (&m); v (); printf ("102.33. "); m = 1; w (); printf ("In function 'main ()' value of 'm' is %i.\n", m); printf ("106.34. "); for (m = 1; m < 4; m++) { printf ("Call number %i.\n", m); x (); printf ("Call number %i.\n", m); x (); } printf ("118.35. "); y ("This is test"); printf ("\n"); getch (); printf ("\n"); } a () {printf ("Call of first function.\n");} b () {printf ("Call of second function.\n");} c () {printf ("Call of third function.\n");} d (float a) { printf ("Length of circle of radius %g equals %.4g.\n", a, 2 * g * a); } float j (float a) {return 2 * g * a;} float k (float a) {return a * a;} s (int *a) {return *a = *a * *a;} t (int *a) {*a = *a * *a;} v () { int a; for (a = 0; a < 80; a++) printf ("-"); } w () { int m; m = 10; printf ("In function 'w ()' value of 'm' is %i.\n", m); } x () { int a = 1; static b = 1; printf ("a = %i, b = %i.\n", a++, b++); } y (const char *a) {while (*a) printf ("%c", *a++ + 1);}
Группа для программистов ( programming )
:Юрий Казекин
/* p47
Language Turbo C 2.0
Extern functions */
#include <conio.h>
#include <stdio.h>
/* Declaration of functions */
a (); b (); c ();
v (); w (); x ();
d (float);
float j (float);
float k (float);
s (int *);
t (int *);
y (const char *);
float g = 3.141592653589; /* number 'pi' */
main ()
{
int m;
float p;
printf ("47.4. ");
a (); b (); c ();
m = 5;
printf ("47.5. ");
d (m);
printf ("49.6. Length of circle of radius %i equals %.4g.\n", m, j (m));
p = 5.2;
printf ("100.29. Square of number %g is equal to %g.\n", p, k (p));
m = 10;
s (&m);
m = 10;
t (&m);
v ();
printf ("102.33. ");
m = 1;
w ();
printf ("In function 'main ()' value of 'm' is %i.\n", m);
printf ("106.34. ");
for (m = 1; m < 4; m++)
{
printf ("Call number %i.\n", m);
x ();
printf ("Call number %i.\n", m);
x ();
}
printf ("118.35. ");
y ("This is test");
printf ("\n");
getch ();
printf ("\n");
}
a () {printf ("Call of first function.\n");}
b () {printf ("Call of second function.\n");}
c () {printf ("Call of third function.\n");}
d (float a)
{
printf ("Length of circle of radius %g equals %.4g.\n", a, 2 * g * a);
}
float j (float a) {return 2 * g * a;}
float k (float a) {return a * a;}
s (int *a) {return *a = *a * *a;}
t (int *a) {*a = *a * *a;}
v ()
{
int a;
for (a = 0; a < 80; a++) printf ("-");
}
w ()
{
int m;
m = 10;
printf ("In function 'w ()' value of 'm' is %i.\n", m);
}
x ()
{
int a = 1;
static b = 1;
printf ("a = %i, b = %i.\n", a++, b++);
}
y (const char *a) {while (*a) printf ("%c", *a++ + 1);}