当前位置:网站首页>Preprocessing command section 3
Preprocessing command section 3
2022-06-12 16:39:00 【m0_ fifty-nine million nine hundred and forty-nine thousand fou】



#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define CORRECT "www.baidu.com"
void main()
{
char str[40];
int cmp(char* str1, char* str2);
printf("Please enter the website you like the best:");
scanf("%s", str);
#ifndef CORRECT
#define CORRECT "www.baidu.com"
#endif // !CORRECT
if (cmp(str, CORRECT) == 0)
{
printf("\nYeah!You are a smart man!\n\n");
}
else
{
printf("\nYou are a not good man!\n\n");
}
}
int cmp(char* str1, char* str2)
{
int i = 0, j = 0;
while (str1[1])
{
while (str2[j] == str1[i])
{
i++;
j++;
if (!str2[j])
{
return 0;
}
j = 0;
i++;
}
return -1;
}
} 
#if 1
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#define ROUND 0
#define PI 3.1415926
void main()
{
int r;
double s;
printf("input a number:");
scanf("%d", &r);
#if ROUND
s = r * r * PI;
printf("Area of round is:%6.5f\n\n", s);
#else
s = r * r;
printf("Area or square is:%6.5f\n\n",s);
#endif
}
#endif
need Understanding printing %6.5f、%g How to choose



边栏推荐
- [BSP video tutorial] BSP video tutorial issue 17: single chip microcomputer bootloader topic, startup, jump configuration and various usage of debugging and downloading (2022-06-10)
- 34-【go】Golang channel知识点
- 【DSP视频教程】DSP视频教程第8期:DSP库三角函数,C库三角函数和硬件三角函数的性能比较,以及与Matlab的精度比较(2022-06-04)
- MySQL - server configuration related problems
- The C programming language (version 2) notes / 8 UNIX system interface / 8.5 instance (implementation of fopen and Getc functions)
- [fishing artifact] UI library second change lowcode tool -- List part (I) design and Implementation
- <山东大学项目实训>渲染引擎系统(六)
- "Shandong University project training" rendering engine system (8-END)
- 超详细干货!Docker+PXC+Haproxy搭建高可用强一致性的MySQL集群
- js监听用户是否打开屏幕焦点
猜你喜欢

超详细干货!Docker+PXC+Haproxy搭建高可用强一致性的MySQL集群

acwing 800. Target and of array elements

Canvas advanced functions (Part 2)

'virtue and art' in the field of recurrent+transformer video recovery

pbootcms的if判断失效直接显示标签怎么回事?

How to base on CCS_ V11 new tms320f28035 project

The process of "unmanned aquaculture"

Leetcode 2190. The number that appears most frequently in the array immediately after the key (yes, once)

Gopher to rust hot eye grammar ranking

Qcustomplot notes (I): qcustomplot adding data and curves
随机推荐
33-【go】Golang sync. Usage of waitgroup - ensure that the go process is completed before the main process exits
Thinking about the probability of drawing cards in the duel link of game king
AssertJ 的异常(Exception )断言
MongoDB系列之SQL和NoSQL的区别
CAS optimistic lock
如何基于CCS_V11新建TMS320F28035的工程
Leetcode 2190. The number that appears most frequently in the array immediately after the key (yes, once)
Leetcode 2194. Excel 表中某个范围内的单元格(可以,已解决)
Acwing high precision multiplication
The C programming language (2nd Edition) notes / 7 input and output / 7.8 other functions
WebRTC 的音频网络对抗概述
<山东大学项目实训>渲染引擎系统(三)
The C Programming Language(第 2 版) 笔记 / 8 UNIX 系统接口 / 8.2 低级 I/O(read 和 write)
Why is your next computer a computer? Explore different remote operations
MySQL系列之分库分表学习笔记
std::set compare
Project training of Shandong University rendering engine system (II)
The process of "unmanned aquaculture"
双写一致性问题
use. Net upgrade assistant upgrades the net core 3.1 project to NET 6