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. can any one share the link for downloading the fir
View Tutorial          By: jay at 2012-01-17 14:21:28

2. program is very long
View Tutorial          By: ajit kumar at 2012-04-21 03:57:13

3. great work
View Tutorial          By: Dinesh557 at 2008-09-25 00:27:59

4. thanx it was really helpful
View Tutorial          By: Vidisha at 2010-07-09 06:21:32

5. Sir, plz tell me how can I run the speech class in
View Tutorial          By: Nitin Govil at 2012-01-21 10:14:52

6. getting the below

Thu Aug 28 23:24:

View Tutorial          By: sudswain at 2014-08-28 17:59:55

7. Hi it really works fin great in my case.
Th

View Tutorial          By: Dnyan at 2007-12-31 02:03:40

8. please give some examples of postfix and infix.
View Tutorial          By: john mark at 2012-10-07 13:55:04

9. i have a shimmer accelerometer(bluetooth). i need
View Tutorial          By: jason at 2012-03-22 04:05:08

10. hello

my problem is how to intrega

View Tutorial          By: mihir patel at 2013-11-28 18:10:04