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. this is really cool......
View Tutorial          By: solex at 2009-05-16 04:02:35

2. Hi Its very useful ad nice article Thanks
View Tutorial          By: Hanish at 2011-07-22 13:12:23

3. Good example to know the concept better.
View Tutorial          By: ARAVIND L at 2009-01-05 04:07:46

4. Aoa. could anybody guide me about jsf with hibern
View Tutorial          By: imtiaz afridi at 2011-12-03 12:19:04

5. hie
can u plz tell how i maintain my rms f

View Tutorial          By: diya at 2010-04-30 01:38:06

6. nice article..
View Tutorial          By: yummy at 2010-01-05 21:18:35

7. i have clear that notify and wait
but where

View Tutorial          By: pp at 2009-06-29 06:12:13

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

9. nice cursor beside learn java...but i do not know
View Tutorial          By: yazidie_y at 2008-03-08 03:33:03

10. How can I submit my query in here?
View Tutorial          By: Kafedha Rwezaula at 2010-06-04 01:32:30