C program to calculate area of cube, C/C++ Programming

Assignment Help:

Aim: To implement program to calculate area of cube using inline function.

Code:

inline void area_cube(float side)

{

            float area;

            area=6*side*side;

            cout<<"\nArea of cube with side "<

}

void main()

{

            int side;

            clrscr();

            cout<<"Program to calculate area of Cube:";

            cout<<"\n Enter side of cube:";

            cin>>side;

            area_cube(side);

            getch();

}

 

Output:

Program to calculate area of Cube:

 Enter side of cube:7

Area of cube with side 7 cm is 294 cm²


Related Discussions:- C program to calculate area of cube

C program, program for lexicographically precedes the given input permutati...

program for lexicographically precedes the given input permutation

Program Preprocessor variable postfix , Run the following C++ program with ...

Run the following C++ program with and without preprocessor variable POSTFIX defined. #include using namespace std; extern "C" int atoi( const char *str );

201 it, overload assignment opertor to assign the data of one object to ant...

overload assignment opertor to assign the data of one object to anthor

Introduction to c programming, How would you print the values of the variab...

How would you print the values of the variables words and lines so they appear in the form: There were 6040 words and 680 lines. Here, 6040 and 680 represent the values of the two

Pseudo code, pseudo code that will determine if the number is prime or comp...

pseudo code that will determine if the number is prime or composite

Overloading binary operators using friend function, Overloading Binary Oper...

Overloading Binary Operators Using Friend Function class SI {float i,p,n,r,a; public: SI(){}; SI(int gp,int gn, int gr); void putdata(void); friend SI operato

Is there anything you can do in c++ which you cannot do in c, A: No. There ...

A: No. There is nothing you can do in C++ which you cannot do in C. In spite of everything

Data structure, Project Description: Project is related indexing data re...

Project Description: Project is related indexing data related some data structure. I need to share all information related project later if i contact any body Skills required

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd