HELP CREATE!! lazarus / 62-General ---------------------------------------------------------------------- ilhamrizki25 · 2018-09-07 04:23 So, I've been trying to create these 2 programs for 4 hours straight. Can someone help me?? 1. Create a program that accepts input integers x and y which state the coordinates of the point . Declare a boolean variable that will be true if the point is located on the X or Y axis. ** instructions: just use a logical operator, not using a case analysis scheme 2. Create a program that accepts input 4 integer numbers x1, y1, x2, y2 which state 2 points, namely and . Calculate the distance between the two points. ** instructions: do not use record type data ---------------------------------------------------------------------- 440bx · 2018-09-07 04:35 Quote from: ilhamrizki25 on September 07, 2018, 06:23:10 amSo, I've been trying to create these 2 programs for 4 hours straight. Can someone help me?? Was that enough time for you to write some code you could post or do you need more time ? ---------------------------------------------------------------------- ilhamrizki25 · 2018-09-07 04:39 Quote from: 440bx on September 07, 2018, 06:35:49 amQuote from: ilhamrizki25 on September 07, 2018, 06:23:10 amSo, I've been trying to create these 2 programs for 4 hours straight. Can someone help me?? Was that enough time for you to write some code you could post or do you need more time ? I've been stuck on number 1 and these are the only program I get : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Program soal1;{Program ini berfungsi untuk menerima input koordinasi titik x dan y yang dimana jika titik tersebut terletak pada sumbu x atau y akan dinyatakan true.} VAR        X,Y : boolean; Begin        writeln('Masukkan Koordinat X = ',X);        writeln('Masukkan Koordinat Y = ',Y);        (X=0) OR (Y=0) := true;        (X<>0) OR (Y<>0) := false;  end. ---------------------------------------------------------------------- taazz · 2018-09-07 04:49 Quote from: ilhamrizki25 on September 07, 2018, 06:39:08 amI've been stuck on number 1 and these are the only program I get : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Program soal1;{Program ini berfungsi untuk menerima input koordinasi titik x dan y yang dimana jika titik tersebut terletak pada sumbu x atau y akan dinyatakan true.} VAR        X,Y : boolean; Begin        writeln('Masukkan Koordinat X = ',X);        writeln('Masukkan Koordinat Y = ',Y);        (X=0) OR (Y=0) := true;        (X<>0) OR (Y<>0) := false;  end. you need to add two readln statements one after each writeln to read the users input and you need to define the boolean variable to hold the answer to your comparison eg Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Program soal1;{Program ini berfungsi untuk menerima input koordinasi titik x dan y yang dimana jika titik tersebut terletak pada sumbu x atau y akan dinyatakan true.} VAR        X,Y : Integer;        OnAxis:Boolean;Begin        writeln('Masukkan Koordinat X = ');      readln(X);        writeln('Masukkan Koordinat Y = ',Y);        OnAxis := (X=0) OR (Y=0);        //(X<>0) OR (Y<>0) := false; this is not neededend. complete the rest. ---------------------------------------------------------------------- Handoko · 2018-09-07 05:05 Maybe something like this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program CoordinateTest; uses  Crt; var  X, Y, i : Integer;  XisZero : Boolean;  YisZero : Boolean; begin   ClrScr;  WriteLn('Please provide a value for X:');  ReadLn(X);  WriteLn('Please provide a value for Y:');  ReadLn(Y);   WriteLn;  Write('Analysing the inputs ');  for i := 1 to 5 do  begin    Delay(2000);    Write('.');  end;  WriteLn;  WriteLn;   XisZero := X = 0;  YisZero := Y = 0;  if XisZero               then WriteLn('The dot is on the Y line.');  if YisZero               then WriteLn('The dot is on the X line.');  if not(XisZero or YisZero) then WriteLn('Nothing special!');  ReadLn; end. Note: Don't copy/paste and submit my code to your teacher. The teacher will know you didn't write the code, also you'll learn nothing. ---------------------------------------------------------------------- ilhamrizki25 · 2018-09-07 05:50 thank you guys for your feedback and help. And no, I won't just copy paste it.