Comment on Tutorial - The if Statement in C++ By Priya



Comment Added by : XavioR

Comment Added at : 2011-01-31 00:53:11

Comment on Tutorial : The if Statement in C++ By Priya
#include<iostream>
#include<conio.h>
using namespace std;

main()
{
float Call_Amount, Call_Duration;
Call_Amount = 3.99;
cout<<"Please input the duration of call(in minutes):";
cin>>Call_Duration;
If (Call_Duration > 3)
{
Additional_Minutes = Call_Duration - 3;
Additional_Charge = Additional_Minutes * 0.45;
Call_Amount = Additional_Charge + Call_Amount;
}
cout<<"Call lasted for "<<Call_Duration<<" minutes. Call amount is "<<Call_Amount<<".";

getch();

}


What's wrong with this?


View Tutorial



Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. very nice explanation of STATIC....HAY man , you j
View Tutorial          By: harkeet at 2012-12-18 17:48:43

2. super example...it very useful for me...
View Tutorial          By: elan at 2011-06-02 07:54:39

3. why java from two to the power 7 bit was upgraded
View Tutorial          By: avinash at 2013-05-28 08:34:24

4. its very useful......to me
View Tutorial          By: dinesh at 2014-08-26 12:47:38

5. it s good ,understanding clearly and with out conf
View Tutorial          By: vasudeva kumar at 2012-01-06 14:04:30

6. what is the data type of the variable direction di
View Tutorial          By: [email protected] at 2009-12-25 03:07:46

7. Is operator overloading possible in java??????
View Tutorial          By: rishi at 2008-11-01 23:55:55

8. Thank uvery much :) u r so helpful
View Tutorial          By: Ahmed at 2011-12-04 10:01:11

9. I am trying to connect mobile to PC. I put your ex
View Tutorial          By: Dedo at 2011-11-30 17:45:32

10. i like this site.good explanation,but it is good f
View Tutorial          By: mamata at 2010-08-16 05:22:53