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



Ask a Question

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. Very good tutorial, but I have a small question he
View Tutorial          By: Mohammad NABIL at 2010-07-20 05:58:19

2. thnks lot 4 helping me
View Tutorial          By: sandeep dudi at 2011-11-17 06:06:03

3. I am a B. Tech. (ECE) student, can i also give scj
View Tutorial          By: Sneha Agarwal at 2013-07-11 08:10:17

4. Thank you for this. I am a beg and this is making
View Tutorial          By: mac at 2011-08-23 13:47:15

5. Thanx................!!!!!!!!!!!
View Tutorial          By: ankita at 2012-01-21 19:16:54

6. Hi,
I'm having a problem with the above cod

View Tutorial          By: sushanth at 2015-05-04 07:32:17

7. I really helped with this tutorial.
In case

View Tutorial          By: maya at 2008-07-30 00:35:51

8. Zabardast
View Tutorial          By: Rohan at 2011-11-03 08:25:59

9. hi there, i was testing your code-samples,

View Tutorial          By: Douglas at 2011-04-07 22:35:56

10. New thread: Thread[One,5,main]
How is the s

View Tutorial          By: Venkatesh at 2013-04-21 07:06:15