#include<stdio.h>
void main()
{
int row,column,add,sub,h,noofrows,noofcolumns,j,finish;
printf("how many rows do you want in your triangle\n");
scanf("%d",&noofrows);
noofcolumns=noofrows-1;
for(row=1;row<=noofrows-1;row=row+1)
{
for(column=-noofcolumns;column<=noofcolumns;column=column+1)
{
add=row+column;
sub=row-column;
if(add==1sub==1)
{
printf("*");
}
else
{
printf(" ");
}
}
printf("\n");
}
finish=((noofrows+noofrows)-1);
for(j=1;j<=finish;j=j+1)
{
printf("*");
}
scanf("%d",&h);
}
Let's suppose you want to draw a triangle using TurboC. Use graphics.h, see the included file bgidemo.c for examples.
Nothing.The C language only recognizes a few keywords, like "for" and "if". Most of what's in a C program ... that doesn't reference routines in the C program itself ... are library calls, and cputs() is one of those. What it does is write its argument (which should be a pointer to a character string) to the console... console put string.
To draw a random triangle.... Declare six variables.... H1 and V1 H2 and V2 H3 and V3 Then using the random function apply the random to the height of your form - this will be H1 Do the same with the width of the form - this will be V1 -- do this twice more, for H2 and V2 - and then for H3 and V3.. Then draw a line from (H1, V1) to (H2, V2) Draw another line from (H1, V1) to (H3, V3) Draw the last line from (H2, V2) to (H3, V3) -- I can't guarantee it will look great, but it _will_ be a triangle. ==== To draw a specific triangle you need much more coding, involving sine rule an other trigonometry.
Write a C program to Draw a RAINBOW and fill the suitable colors ...
draw a line chart.
Nothing. (You can use this word as identifier though.)
Let's assume the triangle has points A, B, and C. Method 1 (3 lines) Draw two lines across the triangle parallel to line segment AB. Now you have two trapezoids and one triangle. Draw another line from C to the any point on the closest of the two lines you just drew, splitting the triangle into two more triangles. Method 2 (2 lines) Draw one line across the triangle parallel to line segment AB. Now you have one trapezoid and one triangle. Draw a second line that passes through C and is perpendicular to AB, splitting the trapezoid into two trapezoids and the triangle into 2 triangles. Method 3 (3 lines) Draw one line from point C to any point on line segment AB. Then draw a line parallel to AC and one parallel to BC, but don't let them cross the line you just drew.
An equilateral triangle MUST be acute. Draw a staright line AB. Take a compass and put its pin point at A and the pencil point at B. Draw an arc on one side of AB. Without disturbing the compass setting, move the pin point to B and draw another arc to intersect the first arc at C. Join CA and CB. Then ABC is an equilateral triangle.
a. (2,6). you draw it on a graph (x,y) b. c. d. make the triangle, a. lies between b. and c.
Draw a circle using a compass. Then, without changing the compass setting, place its point on the circumference of the circle, at any point A, and draw two arcs to intersect the circumference at B and C. Move the compass to B and draw another arc to intersect the circumference at D; and then from C to E. ADE will be an inscribed equilateral triangle.
Yes, you can. You can pass an array of data to your console application.
Draw a horizontal line AB equal to one of the side lengths. From A draw an arc of a circle of radius one of the remaining lengths. From B draw an arc of a circle of radius the third length. Where the arcs intersect is point C. Join AC and BC. Voila!
Side c of a triangle is opposite angle C
If the 13 is the longest side of that right triangle, then the missing side is 5 . If 'c' is the longest side of that right triangle, then the missing one is 17.692 (rounded).
Like one backwards c on top of another backwards c.
a^2 + b^2 = c^2 c= hypotenuse a and b are the legs (sides) of the triangle
In right triangle ABC, angle C is a right angle, AB = 13and BC = 5 What is the length of AC? Draw the triangle to help visualize the problem.
Yes, it is quite simple.Draw a straight line segment, AB. Put the compass point at A and open it so that the pencil point is at B. Then draw an arc. Next, without changing the compass setting move it to B and draw another arc to cut the previous arc at C. [Actually there will be two points, one on either side of AB.] Using the straight edge, join AC and BC. Then ABC is an equilateral triangle.