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. Hey nice article Brian W. Kernighan and/or Dennis
View Tutorial          By: butt at 2013-01-17 07:12:21

2. here is one more inner class example
public

View Tutorial          By: shahalam shaikh at 2012-02-13 21:08:30

3. How to use it
View Tutorial          By: Ted at 2011-12-23 07:23:20

4. Thanks, how about using isset() function on page/U
View Tutorial          By: Paolo at 2009-06-01 07:29:10

5. hello friends .. am looking for the java code that
View Tutorial          By: ahmed at 2008-09-18 21:48:21

6. Great work ;)
View Tutorial          By: Rizwanulla Sharieff at 2012-08-21 04:42:41

7. thanks buddy is's very nice and useful example
View Tutorial          By: mayur at 2012-11-05 05:00:11

8. Hi I am developing a code for data transfer from
View Tutorial          By: Rajavel at 2014-03-21 14:17:54

9. Hi. I have implemented the code and controls just
View Tutorial          By: eibod at 2011-02-13 04:58:44

10. Explanations and examples are more clear. I like i
View Tutorial          By: Rajkumar S at 2010-07-12 22:28:40