Inventor Pradhap

ஆதியும் அந்தமும் என் தமிழே🙏

Post Page Advertisement [Top]

How to calculate Battery range for LED bulbs in C program

How to calculate Battery range for LED bulbs in C program

 

How to calculate Battery range for LED bulbs in C program
How to calculate Battery range for LED bulbs in C program


#include<stdio.h>
int main()

{
	int v,b_w,n;
	float Ah,w,range;
	printf("\nEnter the Battery Voltage	:	");
	scanf("%d",&v);
	printf("\nEnter the Battery Ah		:	");
	scanf("%f",&Ah);
	w = Ah*v;
	printf("\nThe Battery capacity is 	:   %.2f W/h",w);
	printf("\nEnter the Bulb power in W	:	");
	scanf("%d",&b_w);
	printf("\nEnter the number of bulbs	:	");
	scanf("%d",&n);
	b_w = n*b_w;
	range = w/b_w;
	printf("\nLed bulb will glow %.2f Hr",range);
	
	return 0;
}

No comments:

Post a Comment

Bottom Ad [Post Page]