当前位置:网站首页>C language 7-13 day K candle chart (15 points)
C language 7-13 day K candle chart (15 points)
2022-06-13 09:05:00 【Akiyama_】
C Language 7-13 Japan K Candlestick Charts (15 branch )
Input format : Enter... On one line 4 A positive real number , They correspond to each other Open、High、Low、Close, Separated by spaces .
Output format : Output the day... In one line K The type of candle . If there is 、 Down the line , Add after type with Hatch type . If both shadows have , The output with Lower
Shadow and Upper Shadow.
This time the code is this question , Although it doesn't seem difficult , But actually it took a lot of time to write it down ~~
int main(){
float Open,High,Low,Close;
int flag1 = 0,flag2 = 0;
scanf("%f%f%f%f",&Open,&High,&Low,&Close);
if(Close<Open)
{
if(Low<Close && Low<Open)
{
flag1 = 1;
}
if(High>Open && High>Close && flag1){
printf("BW-Solid with Lower Shadow and Upper Shadow");
return 0;
}
if(flag1){
printf("BW-Solid with Lower Shadow");
return 0;
}
printf("BW-Solid");
}
if(Close>Open)
{
if(Low<Close && Low <Open)
{
flag2 = 1;
}
if(High>Open && High>Close && flag2){
printf("R-Hollow with Lower Shadow and Upper Shadow");
return 0;
}
if(flag2){
printf("R-Hollow with Lower Shadow");
return 0;
}
printf("R-Hollow");
}
if(Open==Close)
{
if(Low<Open)
{
printf("R-Cross with Lower Shadow");
return 0;
}
if(High>Open){
printf("R-Cross with Upper Shadow");
return 0;
}
printf("R-Cross");
}
}
边栏推荐
- How to become a white hat hacker? I suggest you start from these stages
- [security] how to counter attack from 0 to 1 to become a security engineer with zero Foundation
- [QNX hypervisor 2.2 user manual] 4.5.1 build QNX guest
- 20211108 differential tracker
- MySQL startup error: innodb: operating system error number 13 in a file operation
- 如何成为白帽子黑客?我建议你从这几个阶段开始学习
- Basic use of cesium, including loading images, terrain, models, vector data, etc
- How many TCP connections can a machine create at most?
- Map 23 summary
- Download address of QT source code of each version
猜你喜欢

教程篇(5.0) 02. 管理 * FortiEDR * Fortinet 网络安全专家 NSE 5

How to become a white hat hacker? I suggest you start from these stages

File upload JS

20220606 关于矩阵的Young不等式

torch. How to calculate addmm (m, mat1, mat2)

【安全】零基礎如何從0到1逆襲成為安全工程師

Uni app subcontracting loading and optimization

【 sécurité 】 comment devenir ingénieur de sécurité de 0 à 1 contre - attaque pour la Fondation zéro

教程篇(5.0) 04. Fortint云服务和脚本 * FortiEDR * Fortinet 网络安全专家 NSE 5

Animation through svg
随机推荐
GBase 8a磁盤問題及處理
20211108 det(AB)=det(A)det(B)
Collection of garbled code problems in idea development environment
20211004 矩阵的子空间
Bash: kill: (74001) - operation not allowed
How excel adds hyperlinks to some text in a cell
12. constructor explanation, explicit, initialization list
Cesium view switching, locating, reading files, building data sources, entity control, model control, etc
银行理财产品有哪些?清算期是多长?
20211020 academician all drive system
Top+jstack to analyze the causes of excessive CPU
Gbase 8A v95 vs v86 compression strategy analogy
Void* pointer
Neo4j环境搭建
an error occurred while trying to rename a file in the destination directory code 5
Jfinal and swagger integration
Visual studio tools using shortcut keys (continuous update)
Common network problems and troubleshooting methods of gbase
How to resolve "the operation cannot be completed successfully because the file contains viruses or potentially junk software
What are the bank financial products? How long is the liquidation period?