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. (i'm a senior PHP programmer, but a newbie in JSP,
View Tutorial          By: LOL at 2013-03-22 08:57:21

2. Hi This is very fine to understanding struts flo
View Tutorial          By: Abinash at 2011-06-28 08:27:18

3. fantastic tutorial and very well explained, I've o
View Tutorial          By: Francis at 2011-08-14 19:57:18

4. Great help
View Tutorial          By: Rajeshvar at 2009-11-04 08:43:09

5. Line 11 says:
cout << "Here's a

View Tutorial          By: Nrom at 2012-06-26 20:16:52

6. Thanks Steven, That is an exhaustive list of diffe
View Tutorial          By: Robert at 2008-12-08 22:17:47

7. thank's a lot for giving me " static "
View Tutorial          By: anwar kotawdekar at 2013-08-14 06:43:34

8. I have some questions : 1) Which type of GC used
View Tutorial          By: SP at 2013-06-04 15:48:59

9. please give me more information
View Tutorial          By: nandhini at 2012-09-22 03:49:11

10. pls send me the brief description about jdbc conne
View Tutorial          By: vikas at 2011-08-09 07:07:53