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

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...