{A program to compute the area of a triangle}
{by Ogboin W. Meshach}
Var;
b,h:real;
BEGIN
Writeln('Triangle');
Write('Base: ');
Readln(base);
Write('Height: ');
Readln(height);
area:=0.5*base*height;
Writeln('Area: ', area :0:2);
End.
To print the desired format in a program, you can use a loop to iterate through the characters of the word "computer" and print substrings of increasing length. Here is a simple Python program to achieve this: word = "computer" for i in range(1, len(word) + 1): print(word[:i]) This program will output the desired format: c co com comp compu comput compute computer
Faisal
No, you can use a decision structure to test a condition in any part of the program and execute some action based on the outcome but you cannot use a decision structure alone to write a complete program.
It would depend on the program you are using and weather or not it is allowable.
A program in c language to implement framing methods like character stuffing can be grave sizeCRC-32 and the variable c50.
Write a c program to compute the surface area and volume of a cube
there is no solution of this problem...........that's it..........
{Area s the area of cube} {Length is the length of one side of the cube} program AreaofCube; var Area,Length:real; begin write('Enter the length of cube: '); readln(Length); Area:=6*(Length*Length); writeln('The area of cube is ', Area, ' cm^2.'); end.
if n MOD 2 == 0 THEN Write ("Even");
if u give control ratios used in budgeting i can write program in C/C++
nr\m;laeoh9y0m g.qthnedxc In fortran: do i=1,5 write(6,*)i enddo stop end This program will write the numbers 1 to 5 on the screen.
$n = 10*(1+10)/2;
int x= 1; int y= 2;
a triangle then a square :)
This is not a question so you do not need to use a question mark at the end of your sentence.
1 1 11 2 11 3 3 11 4 6 4 11 5 10 10 5 1...Simply write the triangle below:11 1Then write 1 on the ends and add the two values above the position you're in to get the next triangle.
This would depend on what programming language you wanted to write it in. For example, in Pascal, the code might look like this: Program Isosceles; Var A, B, C : Real; Begin WriteLn('Input side A.'); ReadLn(A); WriteLn('Input side B.'); ReadLn(B); WriteLn('Input side C.'); ReadLn(C); If A = B Then Begin If B = C Then Begin WriteLn('This triangle is equilateral.'); End Else Begin WriteLn('This triangle is isosceles.'); And so on.