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
why is programming is needed now-a-days.what is the benefit of colleges to apply heavy loads on students head.

Mathematical Statements and assignments    Within C we can directly load up the variable from within the program using the mathematical expression equates (=) e.g.   a= 'h'

Encapsulation and Data Hiding The property of being a self-contained unit is known as encapsulation. The idea that the encapsulated unit can be used without knowing how it work


A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.


Program is to read the contents of a file: void main()    {   ifstream fin("ascii.txt");   char ch;   while(! fin.eof())     {   fin>>ch;   cout     }

write a program to solve e^x

how can I write a c++ program that generate all evn numbers less than 1000?

It is a class defined in the scope of a function _ any function, whether a member functions or a free function. For instance: // Example : Local class // int f() { c