C++
Q) enter any no. and find its cube?(c=a*a*a)
Answers
Answered by
1
Answer:
#include <iostream>
using namespace std;
int main()
{
int i, ctr, cub;
cout << "\n\n Display the cube of the numbers upto a given integer:\n";
cout << "----------------------------------------------------------\n";
cout << "Input the number of terms : ";
cin >> ctr;
for (i = 1; i <= ctr; i++)
{
cub = i * i * i;
cout << "Number is : " << i << " and the cube of " << i << " is: " << cub << endl;
}
}
Plz mark me as the brainliest
Similar questions
Physics,
9 days ago
English,
18 days ago
Environmental Sciences,
18 days ago
Geography,
9 months ago
Science,
9 months ago