Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

cho e hỏi là e thấy e vt đúng r sao vt trên pascal online khi chạy lại báo lỗi hay là e sai ở dâu ạ ?

0 votes
asked Sep 29, 2022 by tong nguyen (120 points)
program hinhvuong;
uses crt;
var a,c,s:real;
begin
    clrscr;
    write('nhap so canh:');readln(a);
    writeln('chu vi hinh vuong');
    c=:a+a+a+a;
    writeln('ket qua:'c);
    writeln('dien tich hinh vuong');
    s=:a*a;
    writeln('ket qua:'s);
readln;
end.

1 Answer

+1 vote
answered Oct 2, 2022 by Peter Minarik (86,240 points)

Your code fixed is below:

program hinhvuong;
uses crt;
var a,c,s:real;
begin
    clrscr;
    write('nhap so canh:');readln(a);
    writeln('chu vi hinh vuong');
    c:=a+a+a+a;
    writeln('ket qua:', c);
    writeln('dien tich hinh vuong');
    s:=a*a;
    writeln('ket qua:', s);
readln;
end.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...