New Member FAQ | Forums | Earn Revenue


Resources Entrance Ask Experts Exam Papers Jobs English Projects Universities Colleges Courses Schools Training My India



My Profile
Active Members
TodayLast 7 Days more...



Awards & Gifts
Online Exams

Fresher Jobs


Our fresher job section is exclusively for fresh graduates! Find jobs for freshers in major Indian cities including Bangalore, Chennai, Hyderabad, Pune or Kochi

Resources


Find educational articles, blogs, discussion threads and other resources.

Colleges


Find details about any college in India or search for courses.

website counter



Unix


Posted Date:     Total Responses: 0    Posted By: vasudevan   Member Level: Gold   Points/Cash: 2   


clear
echo "Electricity Bill Program"
echo "Enter the no of Records"
read n
i=1
echo $i
while [ $i -le $n ]
do
echo "Enter the Customer Name"
read name
echo "Enter the Customer Number"
read prev
echo "Enter the previous Reading"
read prev
echo "Enter the current reading"
read curr
unit=`echo $curr - $prev | bc`
echo $unit
if [ $unit -le 200 ]
then
charge=`echo $unit \*1.00 | bc`
elif [ $unit -gt 200 -a $unit -le 400 ]
then
charge=`echo \($unit - 200 \) \* 1.50 + 200 | bc`
else
charge=`echo \( $unit - 400 \) \* 2 + 200 + 300 | bc`
fi
echo $name $number $prev $curr $unit $charge >>ebbill
i=`expr $i + 1`
done



OUTPUT


Electricity Bill Program
Enter the no of Records

1
Enter the Customer Name
M.A.KARTHICK
Enter the Customer Number
A6106300
Enter the previous Reading
800
Enter the current reading
1000

NO. NAME CUSTOMERNO. PREV.READING CURR.READING UNITCHARGE
1 M.A.KARTHICK A6106300 800 1000 200


Project Feedbacks


No feedbacks found. Be the first to respond and make money from revenue sharing program.

Post Feedback
You must Sign In to post a feedback.
Next Project: Unix
Previous Project: user Name PassWord Checking in Java Applet

Return to Project Index

Post New Project


Related Projects



Advertise Here





Contact Us   Advertise   Editors    Privacy Policy    Terms Of Use   

ISC Technologies.
2006 - 2009 All Rights Reserved.