answersLogoWhite

0


Best Answer

1

2 3

4 5 6

7 8 9 10

11 12 13 14 15

Check out printf and make the above output.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you build a Floyd's triangle in C?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program in c to display isosceles triangle dy digit?

#include<stdio.h> #include<conio.h> void main() { int a,b,c; clrscr(); printf("\n Enter the 3 sides of Triangle: "); scanf("%d %d %d",&a,&b,&c); printf("\nYour entered side is a=%d b=%d c=%d",a,b,c); if(a==b && b==c && a==c) { printf("\n EQUILATERAL TRIANGLE.");//All sides equal in case of Equilateral triangle } else if(a!=b&&b!=c) printf("\n SCALENE TRIANGLE."); //All sides unequal else printf("\n ISOCELES TRIANGLE."); //At least 2 sides equal getch(); }


How can you start the program 'read in the lengths of the sides of a triangle and determine whether the triangle is an isosceles triangle two sides are equal an equilateral triangle three sides are'?

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.


D Write a program that reads 3 sides of a triangle and calculates the perimeter of the triangle and the area using the formulae?

//Written in C++. ALFRED OMONDI ORIMBO (orimbo@gmail.com)# include# includeusing namespace std;void main(){double s,a,b,c,area;couta;coutb;coutc;s=(a+b+c)/2;area = sqrt(s*(s-a)*(s-b)*(s-c));cout


How do you write a Turbo C plus plus program that reads sides of triangle?

You write it exactly the same as you would write it in any other verions of C++, by taking user input to determine the three sides of your triangle. In other words, input three real numbers. What you do with those three numbers is entirely up to you, but presumably you'd want to calculate the angles of a triangle given the length of its three sides. For that you would need to use the cosine rule which states that for any triangle with angles A, B and C whose opposing sides are a, b and c respectively, cos A = (b2 + c2 - a2)/2bc and cos B = (c2 + a2 - b2)/2ca. Knowing two angles, A and B, you can easily work out that angle C must be 180 - (A + B).


How do you build c plus plus programs using netbeans IDE?

Netbeans is primarily a code editor and Java compiler. Although it supports the C++ language, it has no C++ compiler or linker. For that you must provide your own.

Related questions

Why isn't it possible to build a different triangle from anothers three line segments?

Oh but it is possible.If you have a triangle with the three sides labeled 'a', 'b', and 'c' in clockwise order,and you reassemble them in the clockwise order of 'a', 'c', 'b', then the new triangleis not congruent to the original one. It's a different triangle.


What is the side c of the triangle?

Side c of a triangle is opposite angle C


Triangle ABC angle A is 60 what is angle C?

triangle ABC with rigth at C


What is Emily Floyds favorite color?

rainbow.


What is the phone number of the Green Sea Floyds Library in Green Sea?

The phone number of the Green Sea Floyds Library is: 843-392-0994.


Where is the Navilleton Schoolhouse Inc in Floyds Knobs Indiana located?

The address of the Navilleton Schoolhouse Inc is: 7721 Navilleton Road, Floyds Knobs, IN 47119-8605


Where is the Floyd Action Network in Floyds Knobs Indiana located?

The address of the Floyd Action Network is: Po Box 211, Floyds Knobs, IN 47119-0211


Where is the Green Sea Floyds Library in Green Sea located?

The address of the Green Sea Floyds Library is: 5331 Hwy 9, Green Sea, 29545 4949


Is a triangle a good shape to build a bridge with?

no


How do you figure out angle in triangle C is 50?

It depends on the triangle in question. Angle C is not 50 in all cases!


What logo has a blue triangle with a yellow c and a mermaid?

The logo with a blue triangle and yellow c and mermaid is Cressi.


What is the third interior angle of triangle?

Let the angles be a, b and c There are 180 degrees in a triangle: 180-(a+b) = c 180-(a+c) = b 180-(b+c) = a