using records and types
Create a program that will allow a user to store a set of triangle measurements, triangle name, triangle total size and date triangle was entered. Your program will allow the user to enter the size of various triangle and measure their area. The user should also be able to edit and remove existing triangles as well as view all triangles in the menu system.
you can't use gotos

So, what is the question ?

So, what is the question ?

yes this is the question

What do you have so far ?

What do you have so far ?

sorry it's not triangles, it's for cubes
this is what i have so dar, i have no ideaa what to do after
program measurements;
uses crt;
type
cube = record
length: integer;
width: integer;
height: integer;
name: string;
totalsize: integer;
volume: integer;
date: string;
end;

var
cubes: array [1..10] of cube;
menu: integer;
enter: integer;
loop: integer;
choice, i :integer;


begin
while menu <> 5 do
begin
writeln('MENU');
writeln('1. Enter Measurements');
writeln('2. View all data entered');
writeln('5. ');
readln(menu);
if menu = 1 then
begin
writeln(' how many cube measurements would you like to enter');
readln(enter);
clrscr;
for loop := 1 to enter do

begin
clrscr;
writeln(' enter name of cube');
readln(cubes[loop].name);
writeln('enter the height of the cube');
readln(cubes[loop].height);
writeln(' enter the length of the cube');
readln(cubes[loop].length);
writeln(' enter the width of the cube');
readln(cubes[loop].width);
writeln(' enter the date');
readln(cubes[loop].date);
clrscr;

clrscr;
end;
end;
end;

sorry it's not triangles, it's for cubes
this is what i have so dar, i have no ideaa what to do after
program measurements;
uses crt;
type
cube = record
length: integer;
width: integer;
height: integer;
name: string;
totalsize: integer;
volume: integer;
date: string;
end;

var
cubes: array [1..10] of cube;
menu: integer;
enter: integer;
loop: integer;
choice, i :integer;


begin
while menu <> 5 do
begin
writeln('MENU');
writeln('1. Enter Measurements');
writeln('2. View all data entered');
writeln('5. ');
readln(menu);
if menu = 1 then
begin
writeln(' how many cube measurements would you like to enter');
readln(enter);
clrscr;
for loop := 1 to enter do

begin
clrscr;
writeln(' enter name of cube');
readln(cubes[loop].name);
writeln('enter the height of the cube');
readln(cubes[loop].height);
writeln(' enter the length of the cube');
readln(cubes[loop].length);
writeln(' enter the width of the cube');
readln(cubes[loop].width);
writeln(' enter the date');
readln(cubes[loop].date);
clrscr;

clrscr;
end;
end;
end;

please reply and help me

For option 2 create another loop to show all the data you have saved in your array.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.