Answer the question
In order to leave comments, you need to log in
Can't convert real to integer?
What am I doing wrong? I also tried to set the integer type for these variables at once, but it did not help.
Program asdasdas;
uses GraphABC;
begin;
var wWidth, wHeight: integer;
writeln('Введите размер окна');
writeln('Ширину:');
readln(wWidth);
writeln('Высоту:');
readln(wHeight);
SetWindowSize(wWidth, wHeight);
var figureWidth, figureHeight: integer;
writeln('Введите размер фигуры');
writeln('Ширину:');
readln(figureWidth);
writeln('Высоту:');
readln(figureHeight);
//Options
SetPenWidth(3);
//Write center lines
var centerLineWidth, centerLineStartPoint: real;
centerLineWidth:= int(wWidth/100 * 57.14);
centerLineStartPoint:= int(wWidth/100 * 21.43);
Line(centerLineStartPoint, 0, centerLineStartPoint + centerLineWidth, 0);
end.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question