Saturday, April 13, 2013

Serise Circuit: Sum of total registance of an Electric Circuit

Sum of total registance of an Electric Circuit
Ri=R1+R2+R3+............+R



#include<stdio.h>
#include<conio.h>
main()
{
    float sum=0.0,r;
    int i,j,n;
    printf("\t\tIts's a programe to find the total vale of serise circuit\n");
    printf("\n\nHow many registors you use in serise: ");
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        for(j=1;j<=1;j++)
        printf("\n\tEnter the valuse of %d registor:",i);
        scanf("%f",&r);
        sum+=r;
    }
    printf("\nThe total registance of the serise circuit is: %0.3f\n ",sum);
}

No comments:

Post a Comment