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
4 years ago
11

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

Computers and Technology
1 answer:
Burka [1]4 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
A(n) sentinel is a special value that marks the end of a sequence of items.
Anuta_ua [19.1K]

Answer:

Sentinel value

Explanation:

It is the sentinel value in computer programming which is also being termed as the flag value, rogue value, dummy data signal value or the trip value. It has its meaning in the context of the algo, and that clarifies that it is the end of the block or code basically inside a loop or in any kind of recursive algo.

7 0
3 years ago
(03.02 LC)
Elza [17]
VR requires complete immersion, VR devices shut out the physical world completely. The lens on the smart glasses that deliver AR capabilities, on the other hand, are transparent. Understanding these differences is critical in determining the best use cases for each.
5 0
2 years ago
Jack has determined that a virus has infiltrated his computer and corrupted several of his data files. Which two utilities would
Romashka [77]
Antivirus programs to detect and eliminate viruses such as Malwarebytes, Stinger, etc.

A hard drive to backup all of his remaining files.

Corrupted files are not always possible to recover, but it's worth a try using a software such as Recuva.
7 0
3 years ago
Read 2 more answers
Write a program that calls a function to change a variable value from miles to kilometers.
Aneli [31]

Answer:

#include <iostream>

using namespace std;

void miles_to_km(float &miles)//function to convert miles to kilo meters.

{

   miles=miles*1.6;

}

int main() {

   float miles;

   cout<<"Enter the miles"<<endl;

   cin>>miles;//taking input of the miles..

  miles_to_km(miles);//calling function that converts miles to km..

   cout<<"The number of km is "<<miles<<endl;//printing the km.

return 0;

}

Output:-

Enter the miles

54

The number of km is 86.4

Explanation:

I have created  a function miles_to_km of type void which has the argument miles passed by reference.In the function the variable miles is converted to kilo meters.Then in the main function the function is called with the value prompted from the user.Then printing the changed value.

7 0
3 years ago
How to create a database table​
Triss [41]

Try and use this website to help:

https://www.oreilly.com/library/view/access-2013-the/9781449359447/ch01.html

5 0
4 years ago
Other questions:
  • A half-life is the amount of time it takes for a substance or entity to fall to half its original value. Caffeine has a half-lif
    11·1 answer
  • What is the name for the type of flash memory that is used by mobile devices to store their apps and data?
    15·1 answer
  • if you could take on the role as game designer and could change or add some type of financial aspect about the game what would b
    6·1 answer
  • Which statement about images is correct? A) A virtual image cannot be formed on a screen. B) A virtual image cannot be viewed by
    12·1 answer
  • The shortcut key combination to cut text is. Ctrl+C Ctrl+X Shift+V Shift+Y​
    10·2 answers
  • Now suppose that the file is broken into 5 packets, each of 10 Mbits. Ignore headers that may be added to these packets. Also ig
    14·1 answer
  • For each of the following polynomials, apply either the Muller's method or the Bairstow's method to find all real or complex roo
    15·1 answer
  • I plugged my headphones into my computer, but the sound still came out of the speakers. help!
    6·2 answers
  • Authentication is a mechanism whereby unverified entities or supplicants who seek access to a resource provide a label by which
    12·1 answer
  • What are examples of data duplication in flat files? Check all that apply.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!