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
Taya2010 [7]
3 years ago
6

Cerința

Computers and Technology
1 answer:
weeeeeb [17]3 years ago
4 0

Explanation:

Unclear question. But I inferred this to be the clearer rendering of the text below;

Requirement

They are read from the keyboard in natural numbers. Determine the number of prime numbers formed by the last 2 digits of each number.

Input data

The input file 2prim.in contains on the first line the number n, and on the second line n natural numbers in the range [10,10000] separated by a space.

Output data

The 2prim.out output file will contain the number of numbers that have the above property.

Restrictions and clarifications

1 ≤ n ≤ 10000.

You might be interested in
Write an HLA Assembly language program that prompts for a specific int8 value named n and then displays a repeated digit pattern
yan [13]

Answer:

Output:

123456

123456

123456

123456

123456

123456

Explanation:

C Code:

#include <stdio.h>

int main() {

int n,i,j;

printf("Gimme a decimal value to use as n:");

scanf("%d",&n);

for(i=0;i<n;i++){

for(j=1;j<=n;j++){

printf("%d",j);

}

printf("\n");

}

return 0;

}

Equivalent assembly program:

.LC0:

.string "Gimme a decimal value to use as n:"

.LC1:

.string "%d"

main:

push rbp

mov rbp, rsp

sub rsp, 16

mov edi, OFFSET FLAT:.LC0

mov eax, 0

call printf

lea rax, [rbp-12]

mov rsi, rax

mov edi, OFFSET FLAT:.LC1

mov eax, 0

call scanf

mov DWORD PTR [rbp-4], 0

.L5:

mov eax, DWORD PTR [rbp-12]

cmp DWORD PTR [rbp-4], eax

jge .L2

mov DWORD PTR [rbp-8], 1

.L4:

mov eax, DWORD PTR [rbp-12]

cmp DWORD PTR [rbp-8], eax

jg .L3

mov eax, DWORD PTR [rbp-8]

mov esi, eax

mov edi, OFFSET FLAT:.LC1

mov eax, 0

call printf

add DWORD PTR [rbp-8], 1

jmp .L4

.L3:

mov edi, 10

call putchar

add DWORD PTR [rbp-4], 1

jmp .L5

.L2:

mov eax, 0

leave

ret

Input:

6

The program was first written with a c code, anf and subsequently translated to an assembly language.

3 0
3 years ago
D) Informal high level descuption of an algorithm in english kcalled
Hatshy [7]
It might be d I’m not sure die
8 0
3 years ago
Read 2 more answers
Characters of waste water​
scoundrel [369]

Answer:

ain characteristics of wastewater are classified below.

Physical Characteristics. · Turbidity. · Color. ...

Chemical Characteristics due to Chemical Impurities. · Chemical Oxygen Demand (COD) · Total Organic Carbon (TOC) ...

Biological Characteristics due to Contaminants. · Biochemical Oxygen Demand (BOD)

6 0
4 years ago
Read 2 more answers
What connects data center to your device?
konstantin123 [22]

My answer to the question is ISP(Internet Service Provider).

4 0
4 years ago
Meg[] elements = {new Lois(), new Stewie(), new Meg(), new Brian()}; for (int i =0; i
Stells [14]

Complete question is attached as snapshot.

Answer:

This will result in a compilation error.

Here's the inheritance hierarchy:

Meg -> Lois -> Brian -> Stewie

Now Meg has 2 public Fxns, a() and toString().

Lois inherits from Meg and all its public functions as well but, overrides the a() fxn of its super class.

So finally Lois has fxns a(), b() and toString().

Brian extends Lois and inherits all the above listed fxns of Lois, but overrides the b() and toString() fxns.

Stewie extends Brian and inherits all the fxns of Brian, but overrides the a() and toString() fxns.

In the Main driver fxn, we call a() and b() methods of all these classes but, the base class Meg has no b() and it is not extending any class so its not available in its scope.

This results in a compilation error.

Explanation:

7 0
3 years ago
Other questions:
  • In data flow diagrams, an individual who originates data is:
    15·1 answer
  • If an appliance consumes 500 W of power and is left on for 5 hours, how much energy is used over this time period?
    5·1 answer
  • Given the following code fragment, how many times does the loop body execute? int laps = 50; int myNum = 1; do { myNum = myNum +
    9·1 answer
  • 2. Why don't all buses on a motherboard operate at the same speed?​
    6·1 answer
  • ________ is a publicly accessible website that allows users to add and edit interlinked web pages and make contributions from th
    8·2 answers
  • 9.18 LAB: Exact change - methods Write a program with total change amount as an integer input that outputs the change using the
    11·1 answer
  • Cómo se hacían antes las cosas que hoy en día se hacen apoyadas en aplicaciones y software?
    10·1 answer
  • What is string literal in Java?
    5·1 answer
  • Write a program to Test if mold is stored in the variable word.
    5·1 answer
  • The rhythmic note that three beats is called a____half note.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!