Write a program that uses a loop to count to 4
You should turn in a brief report by the end of class.
Your report should include:
• 5 points: Your name
• 20 points:A single question describing what the question is asking
• 30 points:Your code
• 10 points:Your code output
• 10 points:A discussion of your solution
using System;
public class Program
{
public static void Main()
{
Console.WriteLine(“Whaddup World”);
int count = 0;
while(4 >= count){
Console.WriteLine(count);
count++;
}
for (int loopCount = 0; loopCount <=4; loopCount++){
Console.WriteLine(loopCount);
}
}
}
and
import java.util.Scanner;
public class LoopTutorial {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner userInput = new Scanner(System.in);
boolean terminationCondition = false;
while (!terminationCondition) {
System.out.println(“Choose an option!n”
+ “1 for Say Hellon”
+ “2 for count to 4n”
+ “3 for close programn”);
int userDecision = userInput.nextInt();
switch (userDecision) {
case 1:
System.out.println(“Hello”);
break;
case 2:
for (int i = 0; i <= 4; i++) {
System.out.println(i);
}
break;
case 3:
terminationCondition = true;
break;
default:
System.out.println(“Not a valid command”);
break;
}
}//closes while loop
System.out.println(“Goodbye!”);
}
}
Looking for a solution written from scratch with No plagiarism and No AI?
![](https://myprivateresearcher.com/wp-content/uploads/2024/11/Hire.jpg)
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |