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 maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...