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. yes it is very good example for Abstract classes a
View Tutorial          By: obulreddy.G at 2010-07-13 22:52:41

2. Good
View Tutorial          By: PRANJAL at 2015-08-14 16:38:57

3. Please help I want to map the data say username an
View Tutorial          By: akshat at 2011-07-25 12:49:06

4. plz send me java prograams
View Tutorial          By: simmy at 2009-10-26 01:57:55

5. Hei Kaify What is this????
if we get knowle

View Tutorial          By: Sooraj A.S at 2011-08-26 14:12:36

6. Isn't the Vector class deprecated now? I think Arr
View Tutorial          By: Brent at 2013-07-07 06:10:01

7. Thanks for the article. I got some clearance now.
View Tutorial          By: Reddy at 2008-03-15 00:02:17

8. Thanks bro...you save me from a great problem...ve
View Tutorial          By: Tishan at 2012-07-09 09:14:07

9. can i use PrintWriter to save to a word document o
View Tutorial          By: philip at 2013-03-20 10:21:01

10. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: amit doshi at 2009-04-06 02:00:28