当前位置:网站首页>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");
}
}
边栏推荐
- 基于微信小程序的图书馆管理系统.rar(论文+源码)
- final 原理
- 20211108 A转置乘A是正定矩阵吗?A转置乘A是正定矩阵的充分必要条件是什么?
- Module build failed: TypeError: this. getOptions is not a function at Object. stylusLoader
- Tensorflow1.14 corresponds to numpy version
- 教程篇(5.0) 03. 安全策略 * FortiEDR * Fortinet 网络安全专家 NSE 5
- Web page H5 wechat sharing
- 【QNX Hypervisor 2.2 用户手册】4.5.1 构建QNX Guest
- 【网络安全渗透】如果你还不懂CSRF?这一篇让你彻底掌握
- 网上开户安全吗?新手可以开账户吗?
猜你喜欢
【安全】零基础如何从0到1逆袭成为安全工程师
Mapbox usage, including drawing, loading, modifying, deleting points and faces, displaying pop ups, etc
【网络安全】SQL注入新思维之webshell提权
「解读」华为云桌面说“流畅”的时候,究竟在说什么?
Top+jstack to analyze the causes of excessive CPU
图数据库Neo4j介绍
20211104 why are the traces of similar matrices the same
Neo4j - CQL use
Library management system based on wechat applet Rar (thesis + source code)
Tutorial (5.0) 02 Management * fortiedr * Fortinet network security expert NSE 5
随机推荐
Drill down to protobuf - Introduction
教程篇(5.0) 02. 管理 * FortiEDR * Fortinet 网络安全专家 NSE 5
20211005 Hermite矩阵及几个性质
Redirect vulnerability analysis of network security vulnerability analysis
Simulink如何添加模块到Library Browser
20211115 矩阵对角化的充要条件;满秩矩阵不一定有n个线性无关的特征向量;对称矩阵一定可以对角化
Qvector shallow copy performance test
20211004 矩阵的子空间
ES6 use of dynamic attributes
20220606 Young's inequality for Matrices
QT multithreaded TCP server
你不知道的stringstream的用法
13.inline,const,mutable,this,static
Loss outputs Nan for the Nan model
Subspace of 20211004 matrix
Onnx crop intermediate node
How to resolve "the operation cannot be completed successfully because the file contains viruses or potentially junk software
[QNX hypervisor 2.2 user manual] 4.5 building a guest
How excel adds hyperlinks to some text in a cell
如何成为白帽子黑客?我建议你从这几个阶段开始学习