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. in this matter i get also this exception :

View Tutorial          By: oded at 2008-09-28 05:41:35

2. Easy to understand... thank u....
View Tutorial          By: saranya at 2013-02-11 10:37:07

3. Awesome script. works like a charm.


View Tutorial          By: blestab at 2011-03-02 04:32:35

4. Can you send me the file please?
[email protected]

View Tutorial          By: laue at 2014-11-18 20:35:02

5. regarding 'TextMessage' and 'MessageConnection' er
View Tutorial          By: gaurav at 2012-04-24 11:57:17

6. I tried running this code.. I used motorazr v3i as
View Tutorial          By: Arvind at 2009-02-14 10:24:37

7. how does struts work in netbeans 6.9.1?what are th
View Tutorial          By: gunavathi at 2014-05-14 08:00:56

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

9. thank you for your excellent explaination..! :)
View Tutorial          By: marios at 2012-05-16 16:17:31

10. guys i am getting this error..plz tell me the solu
View Tutorial          By: Ajit at 2010-06-17 07:38:51