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 file system is designed to verify and autocorrect data faults on the volume without having to bring the volume down for ma
Aloiza [94]

Answer: ReFS or Resilient File System.

The ReFS system was actually built from the NTFS (New Technology File System). The ReFS has similar features, but also comes with a built-in scanning system. The ReFS constantly checks your data constantly for corrupted data. The ReFS also supports larger volumes of drives and can support up to 32,768 characters.

6 0
3 years ago
PLZZZ HELP!!!
kifflom [539]

Answer:

D the answer is D or c one of those 2

3 0
3 years ago
The primary key is a field that uniquely and completely identifies a record.
Leokris [45]
True

----------------------------------
6 0
3 years ago
Read 2 more answers
How many discussion posts must you complete to meet the Expectations of the replies category
Dennis_Churaev [7]

Answer:

I want to take this time to discuss a few expectations and helpful information about how to participate in the weekly online discussions. You can scroll down the page or use the links here to navigate to each section.  All Discussions can be found by clicking on the Discussions link located on the left-hand side of the course.

Explanation:

Participation in the discussion forums is critical for maximizing student learning in this course, both because your participation is graded and because it's a chance to engage in a dialogue about course material.  In this course, students are required to be a part of an online community of learners who collectively interact, through discussion, to enhance and support the professional performance of each other. Part of the assessment criteria for the course includes evaluating the quality and quantity of your participation in the discussion forum.

The TAS will facilitate student discussions, although they likely will not address every single post. In most cases, they might share a related idea, intervene when the discussion goes off-track, or tie student comments together to help deepen student learning.  Remember, if you have a specific question, pose

3 0
3 years ago
Which is the full form of COPA​
Radda [10]

Answer:

<u>COPA full form or meaning is Computer Operator and Programming Assistant.</u>

5 0
3 years ago
Read 2 more answers
Other questions:
  • 48. What is another word for processor?
    7·1 answer
  • How do you design video games
    5·1 answer
  • ​ If a class is reusable, that is to say that it can be used in several different applications, then it has been designed using
    5·1 answer
  • Your organization issues devices to employees. These devices generate one-time passwords every 60 seconds. A server hosted withi
    15·1 answer
  • Alison retrieved data from a company database containing personal information on customers. When she looks at the SSN field, she
    14·1 answer
  • A company purchased a high-quality color laser printer to print color brochures and sales proposals. The printer is connected to
    5·1 answer
  • when using presentation software, which menu can you use to duplicate a slide to use as a template for a new slide?
    14·1 answer
  • ___________ is related to mass, but also includes the gravitational pull of the Earth.
    14·1 answer
  • 3. Describe at least 3 nonprice competition strategies a company could use to convince customers that its product is better than
    5·2 answers
  • The term Linux Intrusion Detection System ( LIDS) refers to a command that allows an administrator to run processes as root with
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!