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 explanation,very good examples..
View Tutorial          By: sra1 at 2011-11-14 08:30:47

2. Nice Intro to start J2Me
View Tutorial          By: Mak at 2009-07-04 10:36:00

3. Hello sir, I observe that in the first version of
View Tutorial          By: Ganny at 2012-08-13 17:04:58

4. I am getting following error, I am using samsung m
View Tutorial          By: Ashok at 2013-08-17 05:29:02

5. Very helpful tutorial for me.
Thank you for

View Tutorial          By: Mohan at 2012-05-28 00:12:56

6. I really not get your points...
I don't kno

View Tutorial          By: darshit jain at 2014-05-22 09:07:45

7. To 25
void *memset( void *buffer, int ch, s

View Tutorial          By: Doniv at 2011-12-15 10:10:52

8. it is good
View Tutorial          By: kamal at 2009-11-01 19:58:54

9. Hi All,
I can send sms successfully from Wi

View Tutorial          By: henrynawaung at 2008-11-14 06:41:13

10. Now what the hell does all this mean???
To

View Tutorial          By: Søren at 2011-09-22 03:13:53