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

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²

Posted Date: 9/29/2012 3:55:17 AM | Location : United States







Related Discussions:- C program to calculate area of cube, Assignment Help, Ask Question on C program to calculate area of cube, Get Answer, Expert's Help, C program to calculate area of cube Discussions

Write discussion on C program to calculate area of cube
Your posts are moderated
Related Questions

Vogels approximation transportation problem in c language source code

write a program to find the area under the curve y=f(x) between x=a & x=b

Write a program that reads a line of characters from the user and displays that entire line after converting any uppercase characters to lowercase also change any lowercase charact

Write a C++ program with header and source files to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node i

c++ program to to implement multiple stacks using single array

#q•Design and code a new function that accepts as parameters the gross pay by value and the federal tax, state tax, local tax, SS tax, and net Pay by reference. Calculate the taxes


Project Description: I am seeking someone who can make this modem work with Linux Caller ID on Ubuntu present stable version. Skills required are C Programming, Python

For this program you will add and test 2 new member functions to the IntSLList class posted on the website. The two member functions are: insertByPosn(int el, int pos) Assuming t