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



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. I need Structs full notes with examples
View Tutorial          By: Thomas at 2012-10-24 11:18:11

2. Error loading SolarisSerial: java.lang.Unsatisfied
View Tutorial          By: koteshwar at 2011-02-05 05:33:19

3. I need to know the parameters that we need to pass
View Tutorial          By: puru at 2008-09-08 00:33:46

4. How can I use stack in entering a letter and will
View Tutorial          By: mards at 2014-10-17 12:18:34

5. This is a great idea if I am targeting the require
View Tutorial          By: Shanthamurthy Hanumantharayappa at 2015-09-14 16:45:22

6. i need full program for connect oracle to struts l
View Tutorial          By: Munaver Basha at 2010-09-30 01:28:10

7. thank u very much...............
View Tutorial          By: naveen at 2011-07-05 06:00:04

8. Thanks for the solution. I must say however that t
View Tutorial          By: Pierre at 2009-11-19 20:16:35

9. for me also The code gives the following exception
View Tutorial          By: RaghunathaReddy.P at 2009-11-06 23:40:05

10. hi could u tell me how to download a file using se
View Tutorial          By: akki at 2013-02-19 05:52:03