#9 C Program to find how many units of electricity consumed by user based on conditions

This is a very simple program, user enters the electricity units consumed, and based on the conditions whether units are more than or less than 400, the expected output will be shown. You would be wondering what is system("cls") and why I write .2f in the last printf statement. The system("cls") command is used to clear the screen same as we use clrscr() in turbo C++. The .2f format specificier is used to tell the printf method to print floating point values up to 2 decimal places.

Here is the expected output

Post a Comment

0 Comments