Successfully reported this slideshow.
Upcoming SlideShare
×

# C++ project

9,660 views

Published on

Year 2 2nd semester. Report about how to calculate area of circle in programming.

Published in: Engineering, Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Sex in your area is here: ❶❶❶ http://bit.ly/2ZDZFYj ❶❶❶

Are you sure you want to  Yes  No
• Dating for everyone is here: ❤❤❤ http://bit.ly/2ZDZFYj ❤❤❤

Are you sure you want to  Yes  No
• Get Paid For Your Opinions! Earn \$5-\$10 cash on your first survey. ➤➤ https://tinyurl.com/vd3y33w

Are you sure you want to  Yes  No
• Unlock Her Legs(Official) \$69 | Get 90% Off + 8 Special Bonus? ◆◆◆ http://scamcb.com/unlockher/pdf

Are you sure you want to  Yes  No
• My special guest's 3-Step "No Product Funnel" can be duplicated to start earning a significant income online.  https://bit.ly/2kS5a5J

Are you sure you want to  Yes  No

### C++ project

1. 1. 1 ABSTRACT In this project we were given a task on creating a project basically which can give benefits to others. Thus by using Microsoft C++ visual we were creating a program to calculate the area of circle. We were hopping that this program can benefits students at lower level such as secondary school to used our program in order to make them easier to make revision. So in order to make this program we must first understand how to calculate the area of circle. The distance around a circle is called its circumference. The distance across a circle through its center is called its diameter. We use the Greek letter Pi (pronounced Pi) to represent the ratio of the circumference of a circle to the diameter. In the last lesson, we learned that the formula for circumference of a circle is: C equals Pi times d. For simplicity, we use Pi = 3.14. We know from the last lesson that the diameter of a circle is twice as long as the radius. This relationship is expressed in the following formula: diameter formula. Space diagram of the parts of a circle Circle with area shaded space ,the area of a circle is the number of square units inside that circle. If each square in the circle to the left has an area of 1 cm2, you could count the total number of squares to get the area of this circle. Thus, if there were a total of 28.26 squares, the area of this circle would be 28.26 cm2 However, it is easier to use one of the following formulas: Area equals Pi time’s r squared space or space Area equals Pi time r time’s .Where Area is the area, and radius is the radius. Let's look at some examples involving the area of a circle. In each of the three examples below, we will use Pi= 3.14 in our calculations.
2. 2. 2 INTRODUCTION C++ (pronounced see plus plus) is a general purpose programming language that is free- form and compiled. It is regarded as an intermediate-level language, as it comprises both high- level and low-level language features. It provides imperative, oriented and generic programming features. C++ is one of the most popular programming languages and is implemented on a wide variety of hardware and operating system platforms. As an efficient performance driven programming language it is used in systems software, application software, and device drivers, embedded software, high-performance server and client applications, and entertainment software such as video games. Various entities provide both open source and proprietary C++ compiler software, including the FSF, LLVM, Microsoft and Intel. It was developed by Bjarne Stroustrup starting in 1979 at Bell Labs, C++ was originally named C with Classes, adding object-oriented features, such as classes, and other enhancements to the C programming language. The language was renamed C++ in 1983,[7] as a pun involving the increment operator. It began as enhancements to C, first adding classes, then functions, operator, multiple inheritance, templates and exception handling, alongside changes to the type system and other features. C++ is standardized by the International Organization for Standardization (ISO), which the latest (and current) having being ratified and published by ISO in September 2011 as ISO/IEC 14882:2011 (informally known as C++11).[8] The C++ programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which was amended by the 2003 technical corrigendum, ISO/IEC 14882:2003. The current standard (C++11) supersedes these, with new features and an enlarged standard library. It has influenced many other programming languages, including C#, Java and newer versions of C (C99 and C11).
3. 3. 3 OBJECTIVES: In this project, we are trying to use the c++ programming or software in order to simplify our work to get the actual result of calculating the area of circle. The objectives of this project are: I. To get the area of circle through c++ programming II. To enhance the skill in using c++ programming. III. To understand the application of c++ programming in solving the mathematical solution.
4. 4. 4 FLOWCHART AREA OF CIRCLE. START SET PI = 3.14159 READ THE RADIUS CALCULATE THE AREA, A= r x r x PI DISPLAY AREA END
5. 5. 5 PSEUDOCODE Compute the area of circle. 1. Start 2. Set PI = 3.14159 3. Read the radius 4. Calculate the area of circle using a formula: Area = Radius x Radius x PI 5. Display area 6. End
6. 6. 6 CODING OF AREA OF CIRCLE #include <iostream> #include <cmath> using namespace std; int main ( ) { float radius; float circumference; float area; cout << "Please enter the radius of a circle: "; cin >> radius; cout << "n"; circumference = 2 x 3.14159 x radius; area = 3.14159 x radius x radius; cout << "************************************" << "n" << "*Area and Circumference of A Circle*" << "n" << "************************************" << "n" << "tRadius= " << radius << "n" << "tArea= " << area << "n" << "tCircumference= " << circumference << "n"; cin.get ( ); return 0; } //end main
7. 7. 7 DISCUSSION Based on the project that has been completed, we had understand the use and important of C++ programming in our daily life. Each software that had been created were compose by a complex c++ programming. In this project, we had identified the use of C++ programming in mathematical solving. We had use C++ programming in solving the problem of area of the circle. It is easier because the only things that we have to know is the detail of the object, then we only have to insert the value and the area of circle will be shown. Besides that, through the study of C++ programming, we can enchance our skill either in fasten our typing skill or the skills in making a simple C++ programming. Therefore, we as the technologies have to study more detail and understand the use of C++ programming and we can use the skills in C++ programming in future espacially during work.
8. 8. 8 ATTACHMENT
9. 9. 9 CONCLUSION A conclusion can probably draw from C++ programming how to write a program efficiently is that there are no rigid rules to follow; everything is flexible. For example, small code size of a function is not necessarily good because a recursive function, while usually taking fewer lines of code, could have an incredibly big time complexity as opposed to a non-recursive function. There is almost always tradeoff between two approaches, and you are the one who should decide which one better fits your requirements and the situation. C++ is complex including too many constructs to overcome problems with itself and C, while lacking sophisticated mechanisms such as garbage collection, global analysis and automatic optimizations. C is thought of as being a simple language; but this is doubtful, as it has many operators, and a difficult precedence system. C's pointer style of programming is low level and difficult. Overall, C has many traps that lead to difficult to detect errors in software. Now C++ as a language is looking like the equivalent of computers of the 1950s, with large knobs, dials and patch panels; the C++ equivalents being pointers, structures, unions, #defines , etc., all of which have no place in a modern OO language, and are not in Java and Eiffel. Object-oriented languages should provide sophisticated concepts in the simplest possible framework. In C++ the framework is not simple and the concepts are obscured. OOP addresses many issues in order to facilitate the production of complex and sophisticated programs. Many of these issues are addressed in implicit and subtle ways, but are lost in C++. Subtle errors can be introduced into C++ software in many ways; the combination of these causes further problems. C++ has devices for petty convenience, even the `++' itself, while sacrificing major conveniences, long-term correctness and safety, and the convenience of declarative programming, rather than operators. C++ forces the programmer to perform many administrative bookkeeping tasks that a compiler should automate.
10. 10. 10 REFERENCES 1. http://www.emu.edu.tr/aelci/courses/d-318/d-318-files/cppcrit/index005.htm 2. http://www.programmingincpp.com/conclusion.html 3. www.it.uu.se/edu/course/homepage/progbrygg/ht12/CPP/.../kap1.pdf 4. http://programmers.stackexchange.com/questions/29109/is-there-any-reason-to-use-c- instead-of-c-perl-python-etc