Joined
Last Seen
-4 Reputation Points
- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
0% Quality Score
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
0 Endorsements
Ranked #107.55K
1 Posted Topic
Re: [CODE]#include<iostream.h> #include<conio.h> #include<math.h> #include<graphics.h> int main(void) { int gdriver = DETECT, gmode; float x,w1,w,a,f,fs; cout<<"\n\tEnter amplitude:"; cin>>a; cout<<"\n\tEnter freq.:"; cin>>f; cout<<"\n\tEnter sampling points:"; cin>>fs; w=2*3.14*f; initgraph(&gdriver, &gmode, "c:\\tc\\bgi"); line(0, 0,0,500); line(0,200,800,200); // getch(); for(int n=0;n<640;n++) { w1=w*n; x=a*sin(w1/fs); x=x+200; putpixel(n,x,25); } getch(); closegraph(); return 0; }[/CODE] |
The End.