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

Write an algorithm which gets a number N, and prints all the natural numbers less than or equal N. 3.

Computers and Technology
1 answer:
oksian1 [2.3K]3 years ago
3 0

Answer:

Algorithm:

1.Create a variable N.

2.Read the value of N from user.

3.for i=1 to N.

 3.1 Print value of i.

4.end program.

Implementation in C++:

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int N;

cout<<"Enter value of N:";

// read the value of N

cin>>N;

cout<<"Natural number from 1 to "<<N<<" are:";

for(int i=1;i<=N;i++)

{

// print the numbers

   cout<<i<<" ";

}

return 0;

}

Output:

Enter value of N:6                                                                                                        

Natural number from 1 to 6 are:1 2 3 4 5 6

You might be interested in
In OOP terminology, an object's member variables are often called its ________ and its member functions can be referred to as it
sineoko [7]

Answer:Attributes, Methods

Explanation: According to the object-oriented programming, attribute serves as the purpose for defining the an elements features and functioning.It is usually in the form of collection of objects and also known as object's member variable.

Method in the OOP's concept is defined as technique that works on the object that consist of some data and certain features.It also clarifies about the usage or utilization of that data message according to their behavior.

5 0
4 years ago
Fill in the blank. THANK YOUU
Svetllana [295]

Answer:

She's procrastinating

Explanation:

3 0
3 years ago
A Web ____ is a software program that retrieves the page and displays it. Select one:
kari74 [83]
A. browser Web browsers are programs like internet explorer, safari, chrome. You use them to access web pages on the internet.
4 0
3 years ago
A lot of software loads when you boot up any computing device, such as small programs called _______________, that provide suppo
lina2011 [118]

Answer:

Services is the correct answer of the following question.

Explanation:

Loads a lot of applications when booting any computer device, including tiny programs called Services. This provides access for the various operating system functions. A service relates to research carried out by any or several individuals who support us.

  • A machine is technology that executes repetitive tasks, answers to physical activities or responds to many other software information requests.
  • The philosophy of the service explains how a supplier will understand the benefit and expected results of its products.

Other options are incorrect because they are not related to the given scenario.

8 0
3 years ago
The _____ component of a database management system (dbms) is used to add, delete, modify, and retrieve records from a database.
ikadub [295]
The correct answer is:  [A]:  "data manipulation" .
________________________________________________________
3 0
4 years ago
Read 2 more answers
Other questions:
  • A laptop gets replaced if there's a hardware issue. Which stage of the hardware lifecycle does this scenario belong to?
    5·1 answer
  • Assume that to_the_power_of is a function that expects two integer parameters and returns the value of the first parameter raise
    13·1 answer
  • For homework, we have to figure out what's in the picture. It's " too close to tell " but I can't figure out what it is. Any ide
    11·1 answer
  • Write a file path for a document file that is saved on the F drive then a folder called homework, then a folder called math. The
    12·1 answer
  • What is the advantage of saving a document as a PDF file?
    6·1 answer
  • How do productivity programs most benefit the way we work and live?
    12·2 answers
  • Write a static method that takes a String and returns an integer. Return the number of characters in the passed in, String param
    6·1 answer
  • Lesson 12: while loops with the farmer. Number 9.
    10·2 answers
  • Im a beginner programmer. what languages should i learn and how do i get better
    13·1 answer
  • You're on the lead generation team at a wine reseller called Partners in Wine. You've noticed that the user open rate of your em
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!