Comment on Tutorial - Using switch Statements in C++ By Emiley J
Comment Added by : shah
Comment Added at : 2011-02-07 01:11:12
Comment on Tutorial : Using switch Statements in C++ By Emiley J
I want inserted switch statement in my program,
Really need your help and comment.. Thank you..
#include <stdio.h>
#include<conio.h>
#include <math.h>
Main () /*calculate maximun stress */
{
float P, L, w, t;
printf("\t\t\n\n\n <<<This program is to calculate maximum stress>>>\t\n\n\n");
printf("Please input force value, P [KN]: ");
scanf("%f" , &P);
printf("Please input length, L [m]: ");
scanf("%f" , &L);
printf("Please input width, w [cm]: ");
scanf("%f" , &w);
printf("Please input thickness, t [cm]: ");
scanf("%f" , &t);
/* calculate M, y, I */
float M, y, I, max ;
/* convertion */
float w_m, t_m, P_N;
t_m = t /100;
w_m = w /100;
P_N = P * 1000;
/* calculation */
M = P_N * L;
y = t_m /2;
I = (w_m * pow(t_m,3 )) /12 ;
max = (M * y)/ I ;
/* Result */
printf("\n The maximun stress is = %8.3e[pa] or %8.2f[Mpa] \n ", max , max/10000000 );
getch();
system("PAUSE");
}
from..shah
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
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
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. nice
View Tutorial By: rida at 2010-07-03 22:49:04
2. How to do the following
Create a class With
View Tutorial By: Anurag at 2014-01-03 10:14:45
3. Thanks so much!
View Tutorial By: Viet at 2013-01-15 15:02:52
4. Thanks! Very helpful in creating a program i am tr
View Tutorial By: BHaos at 2014-12-05 16:32:53
5. i want ask whether how do i run the application?
View Tutorial By: unknown at 2009-10-29 21:13:03
6. This isn't entirely correct. A class can be abstra
View Tutorial By: Jay at 2013-01-30 14:52:15
7. hi...i have done a project based on spinners..the
View Tutorial By: Nagini at 2015-04-11 05:01:43
8. better
View Tutorial By: sanjeev at 2010-06-12 10:38:04
9. it is working....great
View Tutorial By: mahesh maduranga at 2011-03-27 23:01:57
10. Hi Dear i need help how to send SMS using java
View Tutorial By: NasirAftab at 2008-12-23 07:18:21