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. Hello , How could i Run java.comm on eclipse

View Tutorial          By: Fiars at 2011-04-11 04:53:45

2. Nice article...
View Tutorial          By: Sudhanshu at 2012-08-02 06:19:42

3. My exchange email account is only partially delete
View Tutorial          By: ali at 2010-12-30 02:38:14

4. it is not working
View Tutorial          By: shaishav at 2013-06-20 08:03:06

5. yes,it is a very nice example for abstract classe
View Tutorial          By: saranya at 2010-07-16 05:56:53

6. @Prab, no its 7 since it starts the counting at 0
View Tutorial          By: Shadowfaux at 2009-11-21 15:22:49

7. Hi,
Very Nice explanation ,I tried both mem

View Tutorial          By: Harsh Verma at 2013-01-30 13:43:05

8. Very useful tutorial. But if same code is executed
View Tutorial          By: Jitendra Kumar Mahto at 2011-08-12 15:10:14

9. this site is excellent & too easy to understan
View Tutorial          By: Gaurav Kushwaha at 2010-08-16 06:30:45

10. I am getting this error with Minecraft; Feed the B
View Tutorial          By: LadyKianna at 2013-03-11 05:52:54