Week 1 programming
1. Program and implement a function getint that inputs an integer within the specified range. Its complete function prototype is: int getint(int min, int max);, It is responsible for receiving the user's input, verifying, ensuring that the received must be an integer between min and max ([min, max] interval), and finally returning the integer. ...
Posted by GuitarheadCA on Fri, 18 Feb 2022 04:01:12 +0100
Figure guessing game implementation
preface
The system generates a number between [1100], and the user inputs an integer at will. If the number entered by the user is smaller than the number generated by the system, the prompt "guess lower". If the number entered by the user is larger than the number generated by the system, the prompt guesses higher. If the numb ...
Posted by imcomguy on Fri, 18 Feb 2022 01:02:38 +0100
Implementation of tick TCK toe code in C language
We should all have played the three piece chess game. The rules of the game are not introduced. Let's go through it together before the code is realized!
1. Mind map
2. Design idea
Combined with the above figure, we can split it into three files for writing:
test.c file is used to test the logic of the game do... while function, pri ...
Posted by dkim777 on Thu, 17 Feb 2022 22:59:40 +0100
C programming Tan Haoqiang fifth edition after class answers Chapter IV exercise answers
1. What is arithmetic operation? What is relational operation? What is logical operation?
Analysis: there are too many of these things in C language. Here we only talk about the most common ones.
(1) The most common arithmetic operations are: addition, subtraction, multiplication and division, self increment, self subtraction and modulo
Oper ...
Posted by Squallyboy on Thu, 17 Feb 2022 14:07:47 +0100
Sort | quick sort
thought
For each division, make the left side smaller than the benchmark and the right side larger than the benchmark, but in disorder, and then divide the left and right sides once again. In this way, the division will continue until the size of the decomposed array is 1 and the division stops. At this time, it is in order
Partition function ...
Posted by varecha on Thu, 17 Feb 2022 10:19:44 +0100
MCU C language JSON data processing
1, JSON development ideas
Recently, there is a project that uses JSON data to communicate with the host computer. I will share the development process with you. At first, I wanted to use the JSON library provided by MDK, and there was no problem in compiling, but finally I found that the library had requirements for the compiler, which was not ...
Posted by Ehailey on Thu, 17 Feb 2022 07:37:53 +0100
Python script guessing website database administrator password
Author home page: San Francisco wyx "Author profile": CSDN top200, Alibaba cloud blog experts, Huawei cloud sharing experts, and high-quality creators in the field of network security
1, Functional analysis
A brief analysis of the functions of the website is as follows: The user is required to submit parameters in the address ...
Posted by aron on Thu, 17 Feb 2022 02:26:44 +0100
C language learning notes - floating point functions floor() and ceil() and floating point rounding
in the last article, I learned about the storage principle of floating-point numbers in the computer, and also introduced the functions of rounding and remainder of floating-point numbers Two functions for rounding floating point numbers are also provided in the C language standard library. The function prototype is as follows:
double ...
Posted by br on Thu, 17 Feb 2022 01:58:00 +0100
Four operations of large integers (high precision calculation) (c language)
Large integer operation
For A topic of A + B, if the range of A and B is in the range of int, I believe you can write the program soon. However, if A and B are integers with 1000 digits, there is no data type to represent. At this time, you can only honestly simulate the process of addition, subtraction, multiplication and division. In fact, t ...
Posted by notionlogic on Wed, 16 Feb 2022 15:45:32 +0100
zafu individual 2022.2.16 A B C D E F G summary
zafu individual 2022.2.16 A B C D E F G summary
A - Three DiceAtCoder - abc202_a
Idea: sign in
Reference code:
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define int long long
#define re register int
#define pb emplace_back
#define lowbit(x) (x&-x)
#define fer(i,a,b) for(re i = a ; i <= b ; i ++)
#d ...
Posted by Chrisww on Wed, 16 Feb 2022 13:39:09 +0100