当前位置:网站首页>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");
}
}
边栏推荐
- H5 mobile terminal adaptation
- 【安全】零基础如何从0到1逆袭成为安全工程师
- System analysis - detailed description
- Onnx crop intermediate node
- GBase 8a磁盤問題及處理
- Three indexes reflecting system reliability in performance test: MTTF, MTTR and MTBF
- Can I open an account for the reverse repurchase of treasury bonds? Can I directly open the security of securities companies on the app for the reverse repurchase of treasury bonds? How can I open an
- 15. copy constructor
- 【 sécurité 】 comment devenir ingénieur de sécurité de 0 à 1 contre - attaque pour la Fondation zéro
- Cesium displays a pop-up box at the specified position and moves with the map
猜你喜欢

QObject::connect: Cannot queue arguments of type ‘QTextCursor‘ (Make sure ‘QTextCursor‘ is registere

Qvector shallow copy performance test

20220606 Young's inequality for Matrices

Knowledge points related to system architecture 3

Installation of sonarqube code quality management platform (to be continued)

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

Collection of garbled code problems in idea development environment

QT multithreaded TCP server

Tutorial (5.0) 01 Product introduction and installation * fortiedr * Fortinet network security expert NSE 5

Cmake Learning Series I
随机推荐
教程篇(5.0) 01. 产品简介及安装 * FortiEDR * Fortinet 网络安全专家 NSE 5
Neo4j Environment Building
QML compilation specification
Collection of garbled code problems in idea development environment
Knowledge points related to system architecture 3
「解读」华为云桌面说“流畅”的时候,究竟在说什么?
ES6 use of dynamic attributes
20211104 why are the traces of similar matrices the same
Qvector shallow copy performance test
Void* pointer
Four kinds of hooks in deep learning
Neo4j - CQL使用
国债逆回购能开户吗,国债逆回购在APP上可以直接开通券商安全吗 ,买股票怎么网上开户
20211104 为什么相似矩阵的迹相同
Installation of sonarqube code quality management platform (to be continued)
Margin:0 reason why auto does not take effect
Mapbox loads nationwide and provincial range, displaying multi-color animation points, migration lines, 3D histogram, etc
【网络安全】SQL注入新思维之webshell提权
Software Architecture Overview knowledge
Knowledge points related to system architecture 1