current position:Home>Why did something go wrong and what should I do
Why did something go wrong and what should I do
2022-02-04 16:58:58 【CSDN Q & A】
#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,d;
while(scanf("%d%d %d%d",&a,&b,&c,&d) != EOF)
if(a=c,b=d)
printf("10000");
if(a=c,b=d)
printf("3000");
if(a!=d,b=c&&a=d,b!=c)
printf("1000");
if(a!=b,a!=d,b!=c,b!=d)
printf("none");
return 0;
}
Take the answer :
#include<stdio.h>#include<math.h>int main(){ int a,b,c,d; while(scanf("%d%d %d%d",&a,&b,&c,&d) != EOF) { if(a==b && c==d) { printf("10000"); continue; } if(a==d && b==c) { printf("3000"); continue; } if(a == b || a == d || c == b || c == d) { printf("1000"); continue; } printf("none"); } return 0;}
Other answers 2:
a=ba==b
These are two different operators
Other answers 3:
First , You can only enter two numbers in one line
then , If the two conditions are met at the same time, use &&
Connect , At least one satisfaction is used ||
Connect
Other answers 4:
a=c It's assignment , You want to a and c equal ,a==c
Other answers 5:
To judge equality ==
Logical combination &&
The code is modified as follows :
#include <stdio.h>int main(){ int a,b; int a1,a2,b1,b2,t; while(scanf("%d %d",&a,&b) != EOF) { a1 = a/10; a2 = a%10; b1 = b/10; b2 = b%10; if(a==b) printf("10000\n"); else { if(a1 == b2 && a2 == b1) printf("3000\n"); else if( (a1 == b1 && a2 != b2) || (a1==b2 && a2 != b1) ) printf("1000\n"); else printf("0\n"); } } return 0;}
copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/02/202202041658560689.html
The sidebar is recommended
- Will MySQL's non clustered indexes be queried back to the table?
- How to schedule periodically in maxcompute?
- What are the instructions for configuring the retry time after DTS self built MySQL is synchronized to RDS MySQL's source database and target database cannot be connected?
- Why should MySQL pay attention to the order in the composite index?
- What is an object storage OSS?
- What are the characteristics of the seamless connection between cloud storage and maxcomputesql?
- What is the definition of MySQL database transaction?
- What are the steps of hologres real-time writing and point query?
- What is machine learning Pai?
- What source databases are supported for synchronization between RDS and MySQL instances?
guess what you like
-
What target databases are supported for synchronization between RDS and MySQL instances?
-
What are the prerequisites for supporting synchronization between RDS and MySQL instances?
-
What are the three implications of MapReduce?
-
What are the data formats supported by maxcomputesql
-
What is hologres' view of the execution plan?
-
What are the source database restrictions for synchronization between RDS and MySQL instances?
-
What is the difference between physical server and cloud server?
-
What are other restrictions on synchronization between RDS and MySQL instances?
-
What is the origin of MapReduce?
-
What is a physical server?
Random recommended
- What is the description of the special case of synchronization between RDS and MySQL instances?
- What is the synchronization architecture supported for synchronization between RDS and MySQL instances?
- How does MySQL store Emoji expressions in the database
- How can MySQL select statements only take the first data? How to get the sum of a column of different individuals? 【LIMIT/GROUP BY】
- JavaScript wechat applet solves the problem at the front end. The front end receives data of date time type one day less than that in the database
- What book do you read about C introduction?
- Ask questions about the use of switch in JS.
- JSP suddenly does not recognize java code?
- Use the temporary URL for authorized access. After obtaining the URL, how to send a post request to initialize the segmented upload task
- How to write the code about the oscillation phenomenon of interpolation polynomial in MATLAB?
- About SQL, I can't write it out!
- Please tell me how to write it
- I want to download this 24212 version, but the default download found on the official website is 14.0.23026. Where can I download this
- In C language, how to initialize a string in the structure array (that is, assign a value to a string or make a string empty)
- Push box, why can s move normally when the first character (W, a, s, d) is input, and then only the input characters are displayed (the character array is copied and deformed)
- What went wrong? It can't run
- Matlab about signal input and triangular wave square wave
- Nodemanager starts and automatically closes
- Ask for help. How can I get the project column back
- JavaScript dictionary sorting and a series of methods
- Pictures are stored in OSS with window When open, the same origin policy will appear,
- Ask how to do this problem. Zero basis won't
- Pdf exported by kendoui cannot be recognized & lt; th&gt; What about bold fonts?
- QT file reading and writing (file open and file not open)
- Toggleclass is executed twice in JavaScript
- Structure definition, address transmission and maximum and minimum parameters
- Is this output reversible
- Maven multi module CAS project, the Tomcat server deployed to Linux reports an error
- Questions about the score of mimic IV sofa
- How to get ora-12011
- The first mock exam was taken at the same location and the same angle. The same model was not the same.
- Digital statistics C + + solution. Find the number of occurrences of the same number within a certain range.
- CMD picked up Java when compiling Java_ TOOL_ OPTIONS: -Dfile. encoding=UTF-8
- Java compression, using C # decompression, decompression exception, the extracted file has no directory, is it caused by the inconsistency of the two compression methods
- Double for cyclic printing * square matrix
- Why can the bottom area be calculated, but the volume has no value
- Solving differential equations by mathematical modeling
- The same data as Java shows false with the equals method
- Abstract data types that implement complex numbers
- Vue receives the list array from the back end. How can it be displayed in the table list?
- I want to ask how to do this