Computer Science, asked by navreetchatha13, 1 month ago

Write a program taking three sides of triangle calculate and display the perimeter and area of triangle with heroes formula

Answers

Answered by purveshKolhe
2

You can use the following program::--

In QBASIC:

CLS

INPUT "Enter side 1: ",si

INPUT "Enter side 2: ", sid

INPUT "Enter side 3: ",side

PRINT si + sid + side / 2 + "is your perimeter"

END

In JAVA:

import java.util.Scanner;

public class Brainly {

public static void main(String [] args) {

Scanner sc = new Scanner(System.in);

int si1 = sc.nextInt();

int si2 = sc.nextInt();

int si3 = sc.nextInt();

System.out.println(si1 + si2 + si3 / 2 + "is your perimeter");

}

}

In PYTHON:

side1 = int(input())

side2 = int(input())

side3 = int(input())

print(side1 + side2 + side3 / 2 + "is your perimeter")

This will ask you input of three sides and then print the perimeter.

Hope This Helps You.

Similar questions