Solution of DC networks using C
Programming
Dr. Siba Prasada Panigrahi
&
Students of Mechanical Engineering
(2016-20), VSSUT, Burla
The Problem
• Write a program to solve this network that will
ask input for ‘a’ and find current, with:
b=6 , c=6 , d=4 , e=6 , f=100 , g=50.
The Program
• #include<stdio.h>
• #include<conio.h>
• #include<math.h>
• void main()
• {
• //using mesh analysis//
• float a,i2;
• clrscr( );
• printf("Enter the value of resistance:");
• scanf("%d",&a);
• i2=-(1590+50a)/(216+36a);
• printf("The current through 6 ohm branch is=%d",i2);
• getch();
• }
The Problem
• Write a program to solve this network that will
ask input for ‘c’ and find current, with:
b=6 , a=4 , d=4 , e=6 , f=100 , g=50.
The Program
• #include<iostream.h>
• #include<conio.h>
• Void main()
• {
• Float a,b,c;
• Cout<<”enter the value of resistance:”;
• Cin>>c;
• b=500/((6*a)+21);
• a=(25*(6+c))/((18*c)+63);
• cout<<”the current in the 6 ohm branch is “<<b-c;
• getch();
• }

Solution of dc networks using c programming

  • 1.
    Solution of DCnetworks using C Programming Dr. Siba Prasada Panigrahi & Students of Mechanical Engineering (2016-20), VSSUT, Burla
  • 2.
    The Problem • Writea program to solve this network that will ask input for ‘a’ and find current, with: b=6 , c=6 , d=4 , e=6 , f=100 , g=50.
  • 3.
    The Program • #include<stdio.h> •#include<conio.h> • #include<math.h> • void main() • { • //using mesh analysis// • float a,i2; • clrscr( ); • printf("Enter the value of resistance:"); • scanf("%d",&a); • i2=-(1590+50a)/(216+36a); • printf("The current through 6 ohm branch is=%d",i2); • getch(); • }
  • 4.
    The Problem • Writea program to solve this network that will ask input for ‘c’ and find current, with: b=6 , a=4 , d=4 , e=6 , f=100 , g=50.
  • 5.
    The Program • #include<iostream.h> •#include<conio.h> • Void main() • { • Float a,b,c; • Cout<<”enter the value of resistance:”; • Cin>>c; • b=500/((6*a)+21); • a=(25*(6+c))/((18*c)+63); • cout<<”the current in the 6 ohm branch is “<<b-c; • getch(); • }