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
motikmotik
3 years ago
11

Create a program in Matlab that prints the numbers from 1-100.

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

Answer:

numbers = 1:1:100;

for num=numbers

remainder3 = rem(num,3);

remainder5 = rem(num,5);

 

if remainder3==0

disp("Yee")

else

if remainder3 == 0 && remainder5 == 0

disp ("Yee-Haw")

else

if remainder5==0

disp("Haw")

else

disp("Not a multiple of 5 or 4")

end

end

end  

end

Explanation:

  • Initialize the numbers variable from 1 to 100.
  • Loop through the all the numbers and find their remainders.
  • Check if a number is multiple of 5, 3 or both and display the message accordingly.
You might be interested in
¿que significa “TTAQMMQMPDATLSPLNDTMGCCLFEQMMPQTEIUMDR” ?
OlgaM077 [116]

Answer: what

Explanation:

5 0
2 years ago
Read 2 more answers
The ram called a volatile device select one:<br><br> a. false<br><br> b. true
Paraphin [41]
B. true

RAM (Random Access Memory) is volatile because if power is lost, so is your memory.
6 0
3 years ago
Please help me with this! I’m using Python 3
IgorLugansk [536]

Something like this?

h1 = int(input())

m1 = int(input())

s1 = int(input())

h2 = int(input())

m2 = int(input())

s2 = int(input())

s = h2*3600 + m2*60 + s2 - (h1*3600 + m1*60 + s1)

print(s)

3 0
2 years ago
What is logic gate? ​
Firdavs [7]
A logic gate is an idealized or physical device implementing a Boolean function; that is, it performs a logical operation on one or more binary inputs and produces a single binary output.
7 0
3 years ago
Read 2 more answers
Write a program that demonstrates how various exceptions are caught with catch(Exception exception). This time define classes Ex
SOVA2 [1]

Answer:

Sorry mate I tried but I got it wrong!

Explanation:

Sorry again

6 0
3 years ago
Other questions:
  • The network topology in which each device is connected directly to a central network switch
    9·1 answer
  • Only Lysita knows the password for the question......
    10·1 answer
  • A senior center would like to add a new computer to their library so that members can check their email and read book reviews
    11·2 answers
  • Ben pays his mobile bills, watches movies, and shops online using the Internet. Which internet activity does he perform?
    13·2 answers
  • Premise: Tracy has a file that contains a list of actors and the movies in which they acted. She wants to know the top 3 ranked
    8·1 answer
  • What type of formula uses data from multiple worksheets
    6·1 answer
  • Please write a Java program to read movies.txt file. (It is in Modules under Chapter Code) Create your own movies.ser file from
    14·1 answer
  • What's the smallest part of a computer
    8·2 answers
  • 1. Write a statement that opens the file Customers.dat as a random access file for both reading and writing.
    9·1 answer
  • What is printed when the following code has been executed?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!