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. hello sir,
i am create project autosubtitle

View Tutorial          By: Dilip Gauswami at 2013-12-01 06:46:34

2. we need to know how to write this coding..

View Tutorial          By: lalala at 2009-07-15 20:35:16

3. Hi Binod,

Since JSP code is execute

View Tutorial          By: Aathi at 2009-05-28 21:20:10

4. i want java code for day planner please send me on
View Tutorial          By: sumaiya pathan at 2010-10-15 21:34:23

5. how do i write the above same code using ajax and
View Tutorial          By: Karthik at 2011-08-29 11:21:45

6. it's amazing intro for me. and i think it will b
View Tutorial          By: amar smarty at 2010-05-25 03:26:39

7. i have completed B.Tech,i want to SCJP exam ,tell
View Tutorial          By: bmnaidu at 2013-04-12 16:56:48

8. thankx a lot...i've been trying so hard to learn t
View Tutorial          By: bhuwan at 2009-04-08 23:30:45

9. good
View Tutorial          By: saravanan at 2007-03-02 23:16:00

10. HI . i got the following exception while start up
View Tutorial          By: Ramesh at 2011-02-01 00:14:14