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



Comment Added by : XavioR

Comment Added at : 2011-01-31 00:52:48

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. I am trying to connect mobile to PC. I put your ex
View Tutorial          By: Dedo at 2011-11-30 17:45:32

2. I want to use concept of overriding and i want to
View Tutorial          By: Aniket at 2013-06-20 10:23:10

3. Hi Shruti, If you have better samples then feel fr
View Tutorial          By: jagan at 2010-03-03 19:42:46

4. that's what I've been looking for!!!!!!!!!!!!!!!!!
View Tutorial          By: bibi at 2014-12-28 20:43:56

5. I am quite new to Struts and this article, quite c
View Tutorial          By: Jenghiz at 2010-01-27 23:19:48

6. Hi Friends.... Can you please send the working ver
View Tutorial          By: shafi at 2010-02-18 08:28:49

7. Hi all this program is working very fine .... i ha
View Tutorial          By: Ashish at 2009-03-25 04:28:25

8. hii
i have

two varirables
View Tutorial          By: niranjan at 2012-07-31 06:47:36

9. Hi it really works fin great in my case.
Th

View Tutorial          By: Dnyan at 2007-12-31 02:03:40

10. hello!
I am so confused and a total beginne

View Tutorial          By: Jena at 2011-06-11 17:39:39