Wap to print series from 1 to 10 & find its square and cube, C/C++ Programming

 

# include stdio.h>

# include conio.h>

# include math.h>

 

void main ()

{

int a=1,sqr=0,cube=0;

clrscr ();

while (a<=10)

{

sqr=pow(a,2);

cube=pow(a,3);

printf ("%d\t %d\t %d\n",a,sqr,cube);

a++;

}

getch ();

}

 

Posted Date: 9/10/2012 9:15:24 AM | Location : United States







Related Discussions:- Wap to print series from 1 to 10 & find its square and cube, Assignment Help, Ask Question on Wap to print series from 1 to 10 & find its square and cube, Get Answer, Expert's Help, Wap to print series from 1 to 10 & find its square and cube Discussions

Write discussion on Wap to print series from 1 to 10 & find its square and cube
Your posts are moderated
Related Questions
Create an array of Strings and fill it with some interesting text, such as vacation destinations, album names, or weapon names from a CRPG. Display three elements of the array on t

FUNCTIONS It refers to a subprogram that is meant to do a certain task. It is basically used to execute a set of operations and return information to the main or calling functio


Hi I''m trying to connect to CISCO router using termios. So I decided to have two threads one for reading data and the other one for writing data. The problem is that I have to add

Question 1 Write a program in ‘C' to check whether a given number is even or odd Question 2 Explain while and do... while loop with an example Question 3 Write a program

It is standard on functions to provide some indication that the function has succeeded in its operation. Consider the Scanf function:     scanf("%d",&number1);   If the functio


Define the System Oriented Data Files? System-oriented data files are further closely related to the computer's operating system than Stream- oriented data files and they are s

Default Value Functions,  When declaring a function we can specify a default value for each parameter. This value will be used if that parameter is left blank when calling to the f

Write three functions in C or C++: one that declares a large array statically, one that declares the same large array on the stack, and one that creates the same large array from t