Answer:
4 5 6
Explanation:
Since there is a do-while loop, you need to check the values for each iteration until the condition (Count <= X) is not satisfied.
First iteration -> Count = 1 and X = 3, Y = 1 + 3, Write Y -> 4
Second iteration -> Count = 2 and X = 3, Y = 2 + 3, Write Y -> 5
Third iteration -> Count = 3 and X = 3, Y = 3 + 3, Write Y -> 6
After the third iteration count is equal to 4 and X is equal to 3. That is why loop ends.
Here's my code for that, consider it under the WTFPL (http://www.wtfpl.net/). Here is a pastebin of the code, as to avoid text formatting. (Link: https://pastebin.com/S3BDGxqm Raw: https://pastebin.com/raw/S3BDGxqm)
package javaapplication6;
import java.util.Scanner;
public class JavaApplication6 {
public static void main(String[] args) {
Scanner myScanner = new Scanner(System.in);
boolean a;
int s;
System.out.println("Enter an int");
s = myScanner.nextInt();
a = hasEight(s);
System.out.println(a);
}
private static boolean hasEight(int s)
{
String str = String.valueOf(s);
return str.contains("8");
}
}
Answer:
It depends on your power of resisting fears. everyone have their own tastes.
Explanation:
Answer:
Written in C++
The statement that prints the required output is:
<em>printMessage(favFood);
</em>
Explanation:
The full program is with comment is:
#include<iostream>
using namespace std;
//The method begins here
void printMessage(string favFood){
//This line prints the required output
cout<<favFood<<"_is_great";
}
//The main method starts here
int main()
{
//This line declares favFood as string
string favFood;
//This line prompts user for input
cout<<"Food: ";
//This line gets the input
cin>>favFood;
//This line calls the printMessage method
printMessage(favFood);
return 0;
}
Answer:
Mailings Tab, Start Mail Merge group.
Explanation:
See attached picture.