Explanation:
#include <iostream.h>
#inlcude<conion.h>
void main()
{
int count, x;
clrscr();
cout<<"Enter the count:";
cin>> count;
cout<<"Ready!\n";
for(x=count;x>0;x--)
{
cout<<x<<"\n";
}
cout<<"Start";
getche();
}
This is a simple program where the output is expected to be in reverse order. So we run a for loop starting from the count and decrements the counter by 1 every time when the loop runs and print the value. So to print the output in "new line" we include "\n".
Answer:
1. Headline
2. URL
3. Description
Explanation:
The three components of a text ad on the Google Search Network that Mary will need to know are;
1. Headline
2. URL
3. Description
The headline component on Search Network Text Ad provides up to three fields of 30 characters each.
The Uniform Resource Locator (URL) has the domain name and the web resource for addressing documents accessible over the internet.
Please provide the language you're using when you ask for programming help, otherwise you aren't going to get the answer that you are looking for.
Here it is in Java, and I'm assuming the number is given via user input? Otherwise, just remove the user input function and replace the integer with a value of your choice. Note, that this isn't the full code; only what is relevant to the question.
public static void main(String[] args) {
int num = numInput(10);
printDoubles(num, 100); // You can create a user input function for
// maxValue if you wanted to.
}
/**
* Receives user input between 0 and the absolute value of maxInput.
* @param maxInput The largest absolute value that can be input.
*/
private static int numInput(int maxInput) {
Scanner sc = new Scanner(System.in);
maxInput = Math.abs(maxInput);
int num = 0;
while (!(num > 0 && num <= maxInput)) {
num = sc.nextInt();
if (!(num > 0 && num <= maxInput)) {
System.out.println("Input too small or too large");
}
}
return num;
}
/**
* Continues to print out num doubled until maxValue is reached.
* @param num The number to be printed.
* @param maxValue The maximum value (not including in which num can be doubled to.
*/
private static void printDoubles(int num, int maxValue) {
if (num >= maxValue) {
System.out.println("No output.");
}
while (true) {
if (num >= maxValue) {
break;
}
if (num < maxValue) {
System.out.print(num + " ");
}
num *= 2;
}
System.out.println();
}
The answer to the question is c
Banana fish .. pain. all i know is pain.