Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that prompts the user to enter the weight of a person in kilogra

ID: 670592 • Letter: W

Question

Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds. Output both the weights rounded to two decimal places. Format your output with two decimal places. In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. Write a program that prompts the user to enter the lengths of three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle.

Explanation / Answer

#include<stdio.h>
#include<conio.h>
int main()
{
  float kg,pound;
printf("Enter value of weight in Kilograms : ");
scanf("%f",&kg);
pound=2.20462262184878*kg;
printf(" Convert Kilograms to pounds ");
printf(" %f kg = %f pound",kg,pound);
getch();

  return 0;
}

8)

#include<stdio.h>

int main()

{

    float a,b,c;

    printf(" Enter value for Side1 : ");

    scanf("%f",&a);

    printf(" Enter value for Side2 : ");

    scanf("%f",&b);

    printf(" Enter value for Sid-3 : ");

    scanf("%f",&c);

    if(a<(b+c)&&b<(a+c)&&c<(a+b))

    {

        printf(" result: It is a Triangle.");

        if(a==b&&a==c&&b==c)

        printf(" It is a Equilateral Triangle.");

        else if(a==b||a==c||b==c)

        printf(" It is a Isosceles Triangle.");

        else if((a*a)==(b*b)+(c*c)||(b*b)==(a*a)+(c*c)||(c*c)==(a*a)+(b*b))

        printf(" It is a Right-angle Triangle.");

        else if(a!=b&&a!=c&&b!=c)

        printf(" It is a Scalene Triangle.");

    }

    else

    printf(" result: This Triangle is NOT possible.");

    getch ();

    return 0;

}