Comment on Tutorial - The if Statement in C++ By Priya



Comment Added by : XavioR

Comment Added at : 2011-01-31 00:52:48

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. how to run this program? give sample code to cre
View Tutorial          By: meena at 2012-01-12 11:52:03

2. I am getting the following exception
Error

View Tutorial          By: Balraj Selvakumar at 2008-10-14 03:12:20

3. a bit extra information on robust
View Tutorial          By: mahesh at 2010-02-02 12:05:37

4. super
View Tutorial          By: Dhana at 2007-01-30 03:21:00

5. Dear sir i am complete my B.Tech in this year but
View Tutorial          By: Sarvesh at 2012-04-17 15:16:46

6. nice info 4me
View Tutorial          By: baru at 2015-07-24 08:52:03

7. thats good
View Tutorial          By: P.Kumar at 2009-08-02 10:48:48

8. can any one share the link for downloading the fir
View Tutorial          By: jay at 2012-01-17 14:21:28

9. It works , i had a lot of trouble but finally , i
View Tutorial          By: Omer at 2009-06-30 06:05:17

10. I am able to iterate the list.Now i want to print
View Tutorial          By: akanksha at 2012-09-26 05:25:12