Monday, 28 May 2018

Program to find cube first n number in c

/* program to find cube of a number */
# include <stdio.h>
void main ()
{
int n,a=1,b ;
int counter=0 ;
clrscr () ;
printf ("/n how many no you want to cube:") ;
scanf ("%d", & n) ;
while (counter<n)
{
b =a*a*a ;
printf ("%d", b) ;
counter++ ;
}
getch () ;
}

No comments:

Post a Comment

Featured post

Program to find Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...