Showing posts with label triangle using C++. Show all posts
Showing posts with label triangle using C++. Show all posts

To display a triangle using C Programming!

// to display a triangle using Graphics
#include<stdio.h>
#include<graphics.h>
#include<stdlib.h>
#include<conio.h>
void main()
{
int gd=DETECT,gm,x,a,b;
initgraph (&gd,&gm,"c:\\tc\\bgi ");
while(!kbhit()) //display a triangle till a key is pressed
{
setcolor(WHITE);
line(300,200,400,300);
line(300,200,200,300);
line(200,300,400,300);
}
getch();
}

How to Answer "Do You Use AI?" in an Interview (Without Lying or Bragging) – 2026 Guide

How to Answer "Do You Use AI?" in an Interview (Without Lying or Bragging) – 2026 Guide Learn how to answer "Do you use AI?...