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



Subscribe to Tutorials

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. good work done.
View Tutorial          By: Nitin at 2009-08-29 10:51:41

2. Hi Blackpanther, the mode is either 0 or 1. If you
View Tutorial          By: Ramlak at 2008-04-01 02:24:14

3. java.lang.IllegalArgumentException
at java

View Tutorial          By: gopal at 2011-03-21 00:45:51

4. Hi all, i have tried above code, but am getting fo
View Tutorial          By: swathi at 2010-06-24 05:18:28

5. thanks for giving suitable example to understand m
View Tutorial          By: akash dange at 2011-12-21 05:40:36

6. the default construrctor does not give the defalut
View Tutorial          By: muhammad abdullah at 2011-04-11 13:16:20

7. org.replaceAll("is","was"); en
View Tutorial          By: nirosha at 2013-01-28 16:19:11

8. this is the best example of method overriding but
View Tutorial          By: Dipesh at 2009-09-09 12:52:21

9. i want url full form
View Tutorial          By: arun at 2010-12-10 03:33:49

10. yesh this is very help full for every body.
View Tutorial          By: venkat at 2010-06-29 12:18:57