c - While loop, value k will not increment -


Value is set on increments based on Kashmir, to evaluate l1, l2, l3, l4 K & lt; = G. Am i wrong doing ????

  #include & lt; Stdio.h & gt; # Include & lt; Math.h> Int main (zero) {float C = 0, H = 0, x = 0, i = 0; Printf ("Projections # 2 - Juan Perez \ n"); Printf ("The power of the watt?");); Scanf ("% f", & amp; c); Printf ("The height of the lamp (in meters)?"); Scan ("% F", & amp; nbsp;); Printf ("Distance apart? (In meters?)"); Scanf ("% f", & amp; x); Printf ("Interval? (In meters?)"); Scanf ("% f", & amp; i); Printf ("power:% f \ n", c); Printf ("height:% f \ n", h); Printf ("Distance Distance:% F \ n", x); Printf ("Interval:% F \ n", i); Float k = 75, d = 0, e = x, f = 2 * x, g = 3 * x; Float L1 = ((C * H) / (PF ((H * H) + ((KD) * (KD)), 1.5))); Float L2 = ((C * H) / (PF ((H * H) + ((KE) * (K-E)), 1.5))); Float L3 = ((C * H) / (PF ((H * H) + ((KF) * (KF)), 1.5))); Float L4 = ((C * H) / (PF ((H * H) + (GG) * (KG)), 1.5))); Float J = L1 + L2 + L3 + L4; While (K & lt; = g) {printf ("% f \ n", j); K + = I; }}  

since k = 75, and g = 0, because position is ever It is not true that the loop will never be executed, and the print statement will not work, and Kashmir's rise will never happen.

change

  while (k ; g) { 
   
  while (k & Gt; = g) { 

To fly it out of control (move in an infinite loop), because Kashmir will always be higher than G.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -