pascal

August 12th, 2021

program noname;
var n, i: integer;
a: real;
const x=-50; y=50;
begin
randomize;
n:=100;
a:=0;
for i:=1 to n do
begin
a:=x+(y-x+1)*random;
write (a:4:0);
end;
readln;
end.
it comes up with 100 numbers -50 to 50. what i need now is to make it write numbers that are above and below 0. any ideas what can be done?

Answer #1
what is function of this program ?
Answer #2
he can’t answer you he’s been banned.
Answer #3
Yes edit the source code by editing the const but if you wrote this you would know that…

 

| Sitemap |