|
|
back to boardWhat's wrong? (pascal) Posted by Jumbo 22 Mar 2011 16:44 var x:real;s,s1:string; c,n:integer; begin repeat readln(s); val(s,x,c); if s='#' then halt; readln(s1); if c=0 then begin val(s1,n,c);writeln(x:0:n) end else writeln('Not a floating point number'); until s1='#'; end. Edited by author 22.03.2011 16:49 Edited by author 22.03.2011 16:49 |
|
|