#include
using std::cin;
using std::cout;
using std::endl;
double cube(double number);//prototype
int main()
{
double number = 0.0;
cout << endl << "Enter a number: ";
cin >> number;
cout << endl << "Cube of " << number << " is " << cube(number) << endl;
system("PAUSE");
return 0;
}
double cube(double number)
{
return (number * number * number);
}
Also you can use the function pow(x, y) which returns x to the power of y (you have have include math.h).
Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.
All the smallest factors of a number must be its smallest factor, which for any number is 1, so: loop loop loop print "Enter an integer number: ": input n until num(n) do print "Please enter a number" repeat until n = int(n) do print "Please enter an integer" repeat print "Smallest factor of ":n:" is 1" repeat
write a program to print A to Z on screen in c?
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
# Ruby code print 'Enter n: '; n = gets.to_i n.times { | i | puts ( i + 1 ) ** 2 if ( i + 1 ) % 3.0 == 0.0 }
write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program
echo 'print a pattern'
i want to write a simple without using pointer or array c program which will print greatest number when i give 20 number .........How far have you gotten so far?
Prime numbers are numbers that are only divisible by themselves and the number 1. You can write a program to print all prime numbers from 1 to 100 in FoxPro.
vowels$ = "aeiou" CLS PRINT "PROGRAM: Find if letter is a vowel or not" PRINT INPUT "Type a single alphabet letter: (a-z)/and, then, press Enter key"; aLetter$ PRINT PRINT "Letter "; aLetter$; IF INSTR(vowels$, LCASE$(aLetter$)) THEN PRINT " is a vowel." ELSE PRINT " is NOT a vowel." END
write a program to print the series 1/12+1/22+.........+1/n2 ?
/*to print your namr*/ /*by girish kumar raghuvanshi*/ #include<stdio.h> #include<conio.h> void main() { printf("print ur name"); puts("girish"); getch(); }