uduhsjud

by uhzxuhu on February 19th, 2012
No notes
Syntax: No syntax
Show lines - Hide lines - Show in textbox - Download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. double C, E, t, R, i, Vc;
  8. C = 0.016;
  9. cout << "Please Input the Voltage:\n";
  10. cin >> E;
  11. cout << "*************************\n";
  12. for (t = 0.1; t <= 6.1; t = t+0.3)
  13. {
  14. for (R = 10; R <= 50; R = R+10)
  15. {
  16. i = (E/R)*exp((-t/(R*C)));
  17. Vc = -i*R+E;
  18. cout << Vc << endl
  19. << "-----------\n";
  20. }
  21. }
  22. return 0;
  23. }
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37. #include <iostream>
  38. using namespace std;
  39.  
  40. int main()
  41. {
  42. double P0, P1, amp;
  43. cout << "Enter Input Power\n";
  44. cin >> P1;
  45. cout << "Enter the o/p Power\n";
  46. cin >> P0;
  47. amp = 10*log10(P0/P1);
  48. cout << "Amplification is " << amp << " Db\n";
  49. }

Leave a Reply

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

Subscribe to this comment feed via RSS