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. hii
my crys rpt is nt generating bill, it i

View Tutorial          By: Afan Khan at 2012-04-05 16:48:40

2. Thanks a lot. It solved my problem in a second.
View Tutorial          By: Suddy at 2010-03-25 14:56:10

3. Except for when you're programming low level hardw
View Tutorial          By: Jonathan H at 2012-05-10 08:46:48

4. hello sir

i am simulating railway r

View Tutorial          By: karthick at 2008-08-30 03:09:42

5. Thank you very much..
This helped me a lot

View Tutorial          By: Rabeea AS at 2010-11-15 00:28:29

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

7. hello
thanks for your code
It works

View Tutorial          By: m_karimi at 2008-10-24 12:08:06

8. I have an apple computer and I cannot find the &qu
View Tutorial          By: Dylan at 2009-04-11 19:43:41

9. Hay can you send me complete code to make connecti
View Tutorial          By: 9COOL at 2010-02-22 08:10:47

10. why it is( ((year % 4 == 0) && !(year % 10
View Tutorial          By: Jai Shankar K at 2012-04-08 10:15:56