Answer:
PART ONE
- import java.util.Scanner;
- public class CountToLimit {
- public static void main(String[] args) {
- Scanner scnr = new Scanner(System.in);
- int countLimit = 0;
- int printVal = 0;
- // Get user input
- System.out.println("Enter Count Limit");
- countLimit = scnr.nextInt();
- do {
- System.out.print(printVal + " ");
- printVal = printVal + 1;
- } while ( printVal<=countLimit );
- System.out.println("");
- return;
- }
- }
PART TWO
- import java.util.Scanner;
- public class NumberPrompt {
- public static void main (String [] args) {
- Scanner scnr = new Scanner(System.in);
- System.out.print("Your number < 100: ");
- int userInput = scnr.nextInt();
- do {
- System.out.print("Your number < 100: ");
- userInput = scnr.nextInt();
- }while (userInput>=100);
- System.out.println("Your number < 100 is: " + userInput);
- return;
- }
- }
Explanation:
In Part one of the question, The condition for the do...while loop had to be stated this is stated on line 14
In part 2, A do....while loop that will repeatedly prompt user to enter a number less than 100 is created. from line 7 to line 10
Answer:
<em>d. dumping.</em>
Explanation:
In international trade, dumping is described loosely as <em>selling products on a foreign market below their manufacturing expenses or selling products on a foreign market below their ' reasonable ' market value</em>.
It is a form of injury pricing, a difference in cost aimed at harming the competition.
In this program, I am using the school-based grading system and the program should accept the subject and the number of students.
Program approach:-
- Using the necessary header file.
- Using the standard I/O namespace function.
- Define the main function.
- Declare the variable.
- Display enter obtain marks in 5 subjects.
- Return the value.
Program:-
//header file
#include<iostream>
//using namespace
using namespace std;
//main method
int main()
{
//declare variable
int j;
float mark, sum=0, a;
//display enter obtain marks in 5 subjects
cout<<"Enter Marks obtained in 5 Subjects: ";
for(j=0; j<5; j++)
{
cin>>mark;
sum = sum+mark;
}
a = sum/5;
//display grade
cout<<"\nGrade = ";
if(a>=91 && a<=100)
//display a1
cout<<"a1";
else if(a>=81 && a<91)
//display a2
cout<<"a2";
else if(a>=71 && a<81)
cout<<"b1";
else if(a>=61 && a<71)
cout<<"b2";
else if(a>=51 && a<61)
//display c1
cout<<"c1";
else if(a>=41 && a<51)
//display c2
cout<<"c2";
else if(a>=33 && a<41)
//display d
cout<<"d";
else if(a>=21 && a<33)
//display e1
cout<<"e1";
else if(a>=0 && a<21)
//display e2
cout<<"e2";
else
//display invalid
cout<<"Invalid!";
cout<<endl;
//return the value
return 0;
}
Learn more grading system
brainly.com/question/24298916