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
geniusboy [140]
3 years ago
5

A prime number is an integer that is divisible only by 1 and by itself. Write a program that: 1. Takes a number as an input. 2.

Prints back to the console all the primes that are larger than 1 but not larger than the number that has been entered. You need to have a procedure called isPrime. You may have more procedures if you like. 1. This procedure receives a number through one of the registers. 2. Checks if this number is prime. 3. Returns back through one of the registers to the main program 1, if the number is prime, 0 otherwise. sample run: Please enter a number: 44 Primes found until the given number: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 Press any key to continue .
This is an assembly language assignment. The first they want me to write as c++ and I write it and then I have to translate into the assembly. How I can do that?
This is the code as c++
include Irvine32.inc

.data
string1 "Please enter a number:"
string2 "Primes found until given number:"

.code
main Proc
#include
using namespace std;
bool isPrime(int num);
int main()
{
int num;
bool val;
cout<<"enter a number";
cin>>num;
val=isPrime(num);
if(val==true)
cout<<"It is a prime Number";
else
cout<<"It is not a prime number";
return 0;
}
bool isPrime(int num)
{
int i,count=0;
for(i=2;i<=num;i++){
if(num%i==0)
count++;
}
if(count==2)
return true;
else
return false;
}

exit
main endp
end main
Computers and Technology
1 answer:
Alexandra [31]3 years ago
8 0

Answer:

is c

Explanation:

You might be interested in
Which type of reading is associated with an entry-level job?
REY [17]

Answer:

At entry level of any job, the reading that is essential to know is "<u>User manual</u>" Reading.

Explanation:

In any company or the firm in which some one wants to start at entry level, He needs to know about different rules, components, machines and systems of the company. To fulfill this purpose he needs to read some documents related to operations and functionalities of above mentioned parameters.

<em>These documents are called User Manuals. It contains all necessary information related to the system that will be helpful for the user. In this document step by step process are mentioned to handle the machine or device that is very helpful for entry level employ.</em>

5 0
3 years ago
Can someone taught me? How to use this brainy apps la?​
Anna11 [10]
Okeh, So it basically helps you find answers for you homework and stuff and you can also answer people questions too and get points. You can get brainliest answer too. You can answer fake questions too but then you can be reported and the will delete your account
6 0
3 years ago
Someone help me please
MA_775_DIABLO [31]

Answer:

I think it is the last 2 but i am not 100% sure.

Explanation:

3 0
3 years ago
Brandon purchased a new processor online as an upgrade. When he purchased the processor, he made sure that it used the same sock
LenaWriter [7]

Answer:

The processor and the motherboard goes bad.

Explanation:

Computer system component upgrade allows the enhancement of the component specification. Every computer system comes with a specific quality, size or speed of its various components like the storage drives size, the memory size, the processor speed and even the software components like the operating system.

An upgrade must be compatible with the system configuration like upgrading the processor. If the upgrade is compatible, the processor speed can be increased, but when an upgrade of the processor is not compatible with the chipsets, this could damage the processor and motherboard.

3 0
3 years ago
18-1.1 Merging two individual REA cycle diagrams that share common resources requires changing the minimum cardinalities of:
slava [35]

Answer:

The answer to the following question is the option "B".

Explanation:

The term REA stands for Resources, events, agents. It is a model that provides us an accounting system. In this system, we can re-engineer for the computer age and Integrate separate REA diagrams for individual or a comprehensive organization.  This process does not affect any event and agents who participate in events affecting shared resources. So the answer to this question is "none of the other entities".

3 0
3 years ago
Other questions:
  • Describe the indicators and hazards of a metal deck roof fire in an unprotected steel joist warehouse as well as the techniques
    6·1 answer
  • What would be some long- term goals.
    11·1 answer
  • Your car's engine, transmission, power steering, and brakes all require __________ inspection and changes.
    12·2 answers
  • An IT company revises its process parameters in response to complaints from vendors that products were not ready on time. This w
    15·1 answer
  • The set of rules for how computers talk to one another is called
    12·1 answer
  • Which is the shortest and simplest tax form? <br> 1040 long form <br> 1040EZ<br> 1040A<br> 140E
    14·2 answers
  • What are all the physical components called?
    6·1 answer
  • Given a int variable named callsReceived and another int variable named operatorsOnCall write the necessary code to read values
    13·1 answer
  • The Counter Pattern
    14·1 answer
  • Which file format would be appropriate for web graphics​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!