Comment on Tutorial - The if Statement in C++ By Priya



Comment Added by : Zohaib Farooq

Comment Added at : 2011-05-23 12:47:54

Comment on Tutorial : The if Statement in C++ By Priya
#include<iostream>
#include<conio.h>
using namespace std;

void main()
{
float Call_Amount, Call_Duration,Additional_Minutes,Additional_Charge;
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_Amount<<endl;
cout<<"Call lasted for "<<Call_Duration<<" minutes. Call amount is "<<Call_Amount<<".";
}
else {
cout<<"wrong data";
}
getch();

}


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. sooo nice...:****...love u...
View Tutorial          By: vinoo gopal rao at 2011-07-03 08:54:29

2. I have compiled by keeping all the points in mind
View Tutorial          By: Sweety at 2011-03-09 22:29:18

3. Hi, Please let me know how to implement this progr
View Tutorial          By: Mukul Chadha at 2011-06-29 09:13:28

4. you're so great!
View Tutorial          By: renz at 2008-08-10 18:29:59

5. This Example program is very useful.
good w

View Tutorial          By: sathya at 2008-03-28 02:21:41

6. I have already establish connection with mysql in
View Tutorial          By: shaishav at 2013-06-20 04:27:44

7. thanks brother i hope this is most important for e
View Tutorial          By: manglesh upadhyay at 2012-09-26 04:40:41

8. this is genius.
you are a master of recursi

View Tutorial          By: Chandler at 2010-03-26 09:56:08

9. Thank you very much!!!

But I have t

View Tutorial          By: Gemis at 2009-04-14 02:37:08

10. Hi,

I have a error like the import

View Tutorial          By: manigandavenkatesh at 2015-02-12 05:52:05