C语言填空题(国外英文资料)
C语言填空题
"A"
# include "stdio.h"
Int fun (int n)
{
Int I;
It is the most important thing in the world
For (I = 2)
____; I++)
It is the most important thing in the world
If (___________)
Return 0;
Return 1;
}
The main ()
{int I, n = 0;
It is the most important thing in the world
For (I = 100; ______; I --)
If (fun (I))
{printf (" % 5d ", I);
N++;
}
Printf (" \ n ");
}
# include "stdio.h"
Int fun (int n)
{
Int I;
It is the most important thing in the world
For (I = 2; I < = n minus 1; I + +)
It is the most important thing in the world
If n % I = 0.
Return 0;
Return 1;
}
The main ()
{int I, n = 0;
It is the most important thing in the world
For (I = 100; n < 5; I -)
If (fun (I))
{printf (" % 5d ", I);
N++;
}
Printf (" \ n ");
}
"The second"
The function of the program blank8-1.cpp is to find a divisible digit of n, please delete the underscore _____ in the program and fill in the appropriate content.
# include "stdio.h"
Void fun (int a, int * p)
{
Int n = 0;
While (a)
{n++;
A = a / 10;
}
* * * * * * * * * * * * * * * * * * * * * * *
_________ = n;
}
The main ()
{
Int x, n.
Printf (" please enter a divisible: ");
Scanf (" % d ", & x);
* * * * * * * * * * * * * * * * * * * * * * *
Fun (________);
Printf (" % d has % d number \ n ", x, n);
}
# include "stdio.h"
Void fun (int a, int * p)
{
Int n = 0;
While (a)
{n++;
A = a / 10;
}
* * * * * * * * * * * * * * * * * * * * * * *
* p = n;
}
The main ()
{
Int x, n.
Printf (" please enter a divisible: ");
Scanf (" % d ", & x);
* * * * * * * * * * * * * * * * * * * * * * *
Fun (x, & n);
Printf (" % d has % d number \ n ", x, n);
}
"Three"
The function of a given program is on a n personnel's wage in the array sectional statistic, the number of paragraphs to array b: the number of salary of 1000 yuan to b [0], the salary of 1000 to 1999 yuan to b [1], the number of salary from 2000 to 2999 yuan to b [2], the number of salary from 3000 to 3999 yuan to b [3], the number of salary from 4000 to 4999 yuan to b [4], the number of salary fr