本文介绍了希望有一个C程序来更新显示值,接受输入并仍然运行逻辑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发程序
可以从输入中读取的内容
会发出信号
将运行此逻辑
每分钟更新一次

如果信号a大于值thr
然后值ts变为+1,输出信号b变为1
如果信号a是>信号a-1分钟的值,然后
输出信号b变为1

其他
输出值b变为0

在此逻辑期间,我希望显示的时间显示信号a的值和显示的ts的值

我已经研究出如何在VHDL中执行此操作,但是我在该项目中使用的设备可以与C一起使用.我仍然是C语言编程的新手,因此将不胜感激.

I am working on a program
that will be able to read from an imput
that will send out a signal
that will run this logic
updated every minute

if signal a is greater than value thr
then value ts gets +1 and output signal b gets 1
if signal a is > value of signal a-1minute then
output signal b gets 1

else
output value b gets 0

during this logic I want to have the time displayed display the value of signal a and the value of ts displayed

I have worked out how to do this in VHDL but the equipment that I am using for this project works with C. I am still a newbi at programming in c, so any help would be appreciated.

推荐答案

#include <stdio.h>
main(int t,char _,char *a)
{
return!0<t?t<3?main(-79,-13,a+main(-87,1-_,main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a )&&t== 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\ n'wk nw'iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/") :t<-50?_==*a?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);
}



来源



source


这篇关于希望有一个C程序来更新显示值,接受输入并仍然运行逻辑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 03:23