uduhsjud

by uhzxuhu on February 19th, 2012
No notes
Syntax: No syntax
Show lines - Hide lines - Show in textbox - Download
#include <iostream>
#include <cmath>
using namespace std;
 
int main()
{
	double C, E, t, R, i, Vc;
	C = 0.016;
	cout << "Please Input the Voltage:\n";
	cin >> E;
	cout << "*************************\n";
	for (t = 0.1; t <= 6.1; t = t+0.3)
	{
		for (R = 10; R <= 50; R = R+10)
		{
			i = (E/R)*exp((-t/(R*C)));
			Vc = -i*R+E;
			cout << Vc << endl
				 << "-----------\n";
		}
	}
	return 0;
}
 
 
 
 
 
 
 
 
 
 
 
 
 
#include <iostream>
using namespace std;
 
int main()
{
	double P0, P1, amp;
	cout << "Enter Input Power\n";
	cin >> P1;
	cout << "Enter the o/p Power\n";
	cin >> P0;
	amp = 10*log10(P0/P1);
	cout << "Amplification is " << amp << " Db\n";
}

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS