C Program to draw Op-amp Symbol Using Graphics Function

January 15, 2012 No Comments » Hits : 253





Program : Draw Op-amp in C Programming Using Graphics Function

#include<stdio.h>
#include<conio.h>
#include<graphics.h>

void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");

line(50,125,100,125);   //Horizontal Line -VE Terminal
line(50,175,100,175);   //Horizontal Line +VE Terminal

line(100,100,100,200);  //Vertical Line

line(100,100,150,150);  //Top to Bottom Slant Line
line(150,150,100,200);  //Bottom to Top slant Line

line(125,100,125,125);  //Vertical Line +VCC
line(125,175,125,200);  //Vertical Line -VCC

line(150,150,200,150);  //Horizontal line

getch();
closegraph();
}

Drawing Opamp In C Programming :

To Draw Op-amp We need

  • 3 Horizontal Lines
  • 3 Vertical Lines
  • 2 Slant Lines

Note : Co-ordinates are Shown in Fig. [Call Line Function by Passing End Co-ordinates ]

Incoming search terms: