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 will not contest. Certainly this is extremely im
View Tutorial          By: Bangabee at 2012-11-10 18:17:40

2. ----- main---
Inside Run ...
OK 0 <

View Tutorial          By: pushpam at 2009-01-23 06:14:07

3. fitst read fully and put comments
View Tutorial          By: prasant at 2009-10-07 06:16:19

4. Legend. Worked first time!
View Tutorial          By: Luke at 2014-12-19 10:10:00

5. import java.util.Scanner;
public class Swit

View Tutorial          By: srinath at 2013-04-28 10:17:24

6. I used code when command button clik , it wil show
View Tutorial          By: sekh umar at 2011-06-23 01:40:21

7. Pl provide me code to send sms using USB modems.
View Tutorial          By: Prayag Singh at 2010-09-27 22:50:34

8. hi...i have done a project based on spinners..the
View Tutorial          By: Nagini at 2015-04-11 05:01:43

9. werst program out put nt comming
View Tutorial          By: anu at 2012-08-02 13:09:00

10. hey it is really good notes, to give an idea of
View Tutorial          By: Pawan at 2011-03-26 05:17:28