Sum of Current supply I=I1+I2+I3+.....................+In
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,j,I=0,v,r,sum=0;
printf("\t*Its's a programe to find the total current supply of a circuit bord*\n");
printf("\n\nHow many curent supply point you use in serise bord: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=1;j++)
{
printf("\nEnter the value of %d voltage: ",i);
scanf("%d",&v);
printf("\nEnter the valo of %d registance: ",i);
scanf("%d",&r);
I=v/r;
}
//printf("\n\tEnter the valuse of %d registor:",i);
//scanf("%d",&j);
sum+=I;
}
printf("\n\tThe total current supply of circuit board is: %d\n ",sum);
}
#include<stdio.h>
#include<conio.h>
main()
{
int n,i,j,I=0,v,r,sum=0;
printf("\t*Its's a programe to find the total current supply of a circuit bord*\n");
printf("\n\nHow many curent supply point you use in serise bord: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=1;j++)
{
printf("\nEnter the value of %d voltage: ",i);
scanf("%d",&v);
printf("\nEnter the valo of %d registance: ",i);
scanf("%d",&r);
I=v/r;
}
//printf("\n\tEnter the valuse of %d registor:",i);
//scanf("%d",&j);
sum+=I;
}
printf("\n\tThe total current supply of circuit board is: %d\n ",sum);
}
No comments:
Post a Comment