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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program 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
Archived Comments
1. i want a java code to make a GUI in netbeans and s
View Tutorial By: siddharth at 2012-03-17 09:59:59
2. This is very useful for beginners.
I want f
View Tutorial By: shankar at 2013-02-04 13:28:16
3. need to be place taglig in the <jsp-config>
View Tutorial By: Shaik Basha at 2013-01-30 03:11:41
4. @ Qui:
You can set the CSS Style:
View Tutorial By: hache at 2010-06-22 02:02:56
5. I have a HSQL query that uses many tables and I'm
View Tutorial By: Kris Reid at 2009-11-04 15:23:40
6. Your output is not correct.. Give the correct out
View Tutorial By: Surendrakumar at 2014-06-04 07:00:16
7. Its working perfectly for me.Thanks so much for pr
View Tutorial By: Sunpenn at 2009-10-13 00:53:09
8. Helpful..
View Tutorial By: syam at 2009-12-29 07:14:05
9. Hi,
Thanks a lot to the writer of t
View Tutorial By: Bhushan at 2007-04-27 04:56:00
10. Hi for Java beginners this is the right place to s
View Tutorial By: Anon at 2009-02-01 21:14:28