Wednesday, 31 October 2018

Program to find cube first n number in c

/* program to find cube of a number */
#include <iostream.h>
# include <stdio.h>
void main ()
{
int n,a=1,b ;
int counter=0 ;
clrscr () ;
cout<<"/n how many no you want to cube";
cin>> n;
while (counter<n)
{
b =a*a*a ;
cin >>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...