1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
ICE Princess25 [194]
3 years ago
15

Write c++ program from 1to 100 to find prime numbers using statement.please help me​

Computers and Technology
1 answer:
svetlana [45]3 years ago
7 0

Answer:

int count;

for (int i = 1; i <= 100; i++){

count = 0;

for (int j = 1; j <=i; j++)

if (i%j==0) count ++;

if (count == 2) cout << i << " ";

}

You might be interested in
A sense of scale tells us what about the objects in a picture?
monitta

Answer:

A. the size

Explanation:

7 0
3 years ago
Read 2 more answers
Linux uses the freeware ____ shell as its default command interpreter.
babymother [125]
<span>Linux uses the freeware bash shell as its default command interpreter.</span>
6 0
4 years ago
Danielle, Edward, and Francis are three salespeople at Holiday Homes. Write an application named HomeSales that prompts the user
sergij07 [2.7K]

Answer:

import java.util.Scanner;

public class HomeSales

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

    String name = "";

    double sale = 0.0;

   

 System.out.print("Enter a salesperson's initial (D, E, or F ) ");

 char initial = input.next().charAt(0);

 initial = Character.toUpperCase(initial);

 

 if(initial == 'D')

     name = "Danielle";

 else if(initial == 'E')

     name = "Edward";

 else if(initial == 'F')

     name = "Francis";

 else

     System.out.println("Invalid initials entered!");

     

 if(!name.equals("")){

     System.out.print("Enter sale amount ");

     sale = input.nextDouble();

     System.out.println(name + " " + sale);

 }

}

}

Explanation:

*The code is in Java.

Initialize the name and sale

Ask the user to enter the initial

Convert initial to uppercase

Check the initial using if else statement and depending on the value, set the name. If a valid initial is entered, print an error.

If the name is not empty (This implies that a valid initial was entered), ask the user to enter the sale amount and print the name and sale amount

7 0
3 years ago
While in the Current View command group for notes, which view options do you have available? Check all that apply.
andriy [413]

Answer:

The Answers are A,C,E

Explanation:

8 0
3 years ago
Read 2 more answers
How to remove special formatting from a table in word.
ch4aika [34]

Answer:

Clear Format

Explanation:

7 0
2 years ago
Other questions:
  • The throws clause of a method: a. specifies the exceptions thrown by the calling method. b. specifies the exceptions a method th
    9·1 answer
  • Ponce is the largest city on which coast of Puerto Rico
    13·1 answer
  • The ________ of the operating system enables users to communicate with the computer system. modem window network adapter card us
    14·1 answer
  • It is important to create an IT security program structure that aligns with program and organizational goals and describes the o
    6·1 answer
  • (True/False). If the definition of an IS is the medium for recording and storing data, and disseminating information, this would
    12·2 answers
  • Help on What i should say to my IT school lady? Read all three pages
    10·1 answer
  • What tag would you enter to link the text “White House" to the URL<br> http://www.whitehouse.gov?*
    15·1 answer
  • Anyone know how to do Calculator program in python ?
    14·1 answer
  • Which coding manual contains three to seven character codes with a decimal after the third character
    11·1 answer
  • Suppose that you want to write a program that inputs customer data including name, zipCode, balance, and regionNum. At the end o
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!