-
Cite month[12][10]; Wrong. Without the element month[12][10], up to month[11][9], and the pointer p is useless. There's also the deletion of all your +10-level corresponding *.
In a two-dimensional array, only the first subscript represents the address at the beginning of the row, and the address in scanf is not the variable name.
-
Hello, you made a mistake at scanf.
If I'm not mistaken, it should be scanf("%s", the first address of the string);
Don't forget to end your typing with '0'.
-
=0)!=0? printf("not"):(t=(a+b+c)%2);
And. t==0? printf("yes"):printf("not");
It's two "sequential" commands, so in some cases both statements are executed.
Since the sum of two odd numbers and an even number must be even, you can first determine whether the sum of the three numbers is even; And since there are only two cases when the sum of three numbers is even: 1, two odd numbers and an even number, 2, and three are even numbers, so as long as one of the three numbers is judged to be an odd number, it can be proved to be the first case, that is, what the question asks:
#include
void main()
int a,b,c;
scanf("%d,%d,%d",&a,&b,&c);
a+b+c)%2==0?(a%2!=0||b%2!=0||c%2!=0?printf("yes"):printf("not")):printf("not");
-
This program will report an error because it is not allowed to define a variable with the same name as an externally defined constant in the main function. You can change the variable name inside main to something else, or delete it.
Yes, inside main there is a new pi variable that has the same name as the global constant pi, but it is not a constant, and it can be modified, which will cause the program to be incorrect.
The solution is to use a different name for the pi variable in main to avoid name conflicts, e.g
#include
const double global_pi=;
int main(){
double local_pi=;
double area;
double r=;
area=local_pi*r*r;
printf("The area is: %2f",area);
return 0;
using system;
using ; >>>More
1. Flashing and rooting are the underlying operations of the operating system of the mobile phone, and it is not recommended for non-professionals to flash and root. >>>More
C language does not round, if you want to round it, such as a to keep two decimal places: >>>More
First question: What does exit failure mean? Why do you need this thing in this program? >>>More
int main()
int i,j,a[100]; >>>More