The answer is (c) infinite loop
Answer:
The program to this question can be describes as follows:
Program:
#include <stdio.h> //defining header file
int main() //defining main method
{
int n,i,x=0; //defining integer variable
printf("Enter a number: "); //print message
scanf("%d",&n); //input value from the user
printf("%d\n",n); //print input value
for(i=1;i<n;i++) //loop to count reverse number
{
x=n-i; //calculate value
printf("%d\n",x); //print value
}
return 0;
}
Output:
Enter a number: 3
3
2
1
Explanation:
- In the above program, three integer variable "n,i and x" is declared, in which variable n we take input from the user end and the variable i and x is used in the loop to calculate the value in the reverse order.
- In the next step, a loop is declared, in which the variable x calculates the value in reverse order and uses a print method to print its value.
Answer:
result = pow(10,5);
Explanation:
A complete code in C++ with the necesary header file for the math class is given below:
#include <iostream>
//import the header file to use the power function
#include<cmath>
using namespace std;
int main()
{
double base = 10.0;
double result;
//Use Power function to raise base to power of 5
result = pow(10,5);
//print out the result
cout<<result;
return 0;
}
B. Select the range of data. You have to highlight it first so it knows what you are going to convert into a table.