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. hey. How would i get the ClientLists displayed in
View Tutorial          By: andrew at 2009-07-24 14:10:24

2. Hi, I second that Raghav, kindly can u email me a
View Tutorial          By: SAM at 2011-03-06 05:03:09

3. super explanation
View Tutorial          By: pree at 2013-12-30 16:41:32

4. The program will work only need to change

View Tutorial          By: LEENA NARULA at 2012-06-15 06:45:06

5. i want jsp code
View Tutorial          By: KIRTHANA at 2015-07-31 05:29:04

6. helpful :)
View Tutorial          By: ravinder at 2012-03-22 11:52:19

7. Cool! Downloading the whole file with the HttpCon
View Tutorial          By: Luddite at 2010-06-26 12:26:26

8. my code is unable to open included files
ho

View Tutorial          By: MANAS at 2013-09-08 05:44:46

9. Your code will not execute using above main method
View Tutorial          By: Gajanan Patil at 2012-05-09 04:42:29

10. DOBN'T USE THIS SHIT
IT IS STRONGLY DISCOUR

View Tutorial          By: DD at 2011-09-13 13:00:30