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
FrozenT [24]
2 years ago
12

A programmer writes a for statement to count from 1 to 10 and explicitly mentions the 1 and the 10 in the for “header.” which re

lational operator would probably be used in the loop-continuation tes
Computers and Technology
1 answer:
o-na [289]2 years ago
6 0
The relational operator used would probably be <=
You might be interested in
What is a table in excel
tekilochka [14]
A table in excel is responsible for keeping track of numerical data.

Meaning information in the form of numbers.
8 0
3 years ago
Read 2 more answers
In this lab, you complete a C++ program that swaps values stored in three int variables and determines maximum and minimum value
Sergio039 [100]

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int first = 0,second = 0,third = 0;//defining integer variable  

int temp; //defining integer variable

const string SENTINEL = "done"; // defining a string variable as constant  

string repeat;// defining a string variable  

bool notDone = true; //defining bool variable

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

while(notDone == true)//defining a loop to check the value  

{

if(first > second)//use if to compare first and second value

{

int temp = first;//defining temp to hold first value

first = second;//holding second value in first variable

second = temp;//holding temp value in second variable

}

if(second > third)//use if to compare second and third value

{

int temp = second;//defining temp to hold second value

second = third;//holding second value in third variable

third = temp;//holding temp value in third variable

}

cout << "Smallest: " << first << endl;//print smallest value

cout << "Next smallest: " << second << endl;//print Next smallest value

cout << "Largest: " << third << endl;////print Largest value

cout << "Enter any letter to continue or done to quit: ";//print message

cin >> repeat;//holding string value

if (repeat == SENTINEL)

{

notDone = false;//holding bool value

}  

else //else block

{

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

}

return 0;

}

}

Output:

Please find the attached file.

Explanation:

  • Inside the main method Four integer variable "first, second, third, and temp" is declared in which first three variable is used for input value and temp is used to compare value.
  • In thew next step, two string variable "SENTINEL and repeat" is declared in which "SENTINEL" is constant and a bool variable "notDone" is declared.
  • After input the value from the user-end a loop is declared that compare and swap value and print its value.

6 0
2 years ago
Edhesive assignment 7 calendar
ikadub [295]

Answer:

def leap_year(y):

 if y % 4 == 0:

     return 1

 else:

     return 0

def number_of_days(m,y):

 if m == 2:

     return 28 + leap_year(y)

 elif m == 1 or m == 3 or m == 5 or m == 7 or m == 8 or m ==10 or m == 12:

     return 31

 elif m == 4 or m == 6 or m == 9 or m == 11:

     return 30

def days(m,d):

 if m == 1:

     return 0 + d

 if m == 2:

     return 31 + d

 if m == 3:

     return 59 + d

 if m == 4:

     return 90 + d

 if m == 5:

     return 120 + d

 if m == 6:

     return 151 + d

 if m == 7:

     return 181 + d

 if m == 8:

     return 212 + d

 if m == 9:

     return 243 + d

 if m == 10:

     return 273 + d

 if m == 11:

     return 304 + d

 if m == 12:

     return 334 + d

def days_left(d,m,y):

 if days(m,d) <= 60:

     return 365 - days(m,d) + leap_year(y)

 else:

     return 365 - days(m,d)

print("Please enter a date")

day=int(input("Day: "))

month=int(input("Month: "))

year=int(input("Year: "))

choice=int(input("Menu:\n1) Calculate the number of days in the given month.\n2) Calculate the number of days left in the given year.\n"))

if choice == 1:

 print(number_of_days(month, year))

if choice == 2:

 print(days_left(day,month,year))

Explanation:

Hoped this helped

5 0
2 years ago
Nathan would like to save his PowerPoint presentation as a video that can be replayed easily on any device at full quality. Whic
aniked [119]

Answer:

Presentation Quality

Explanation:

7 0
2 years ago
Jax needs to write a block of code that will organize a list of items alphabetically. Which function should he use?
Zielflug [23.3K]
I would say sort since he’s sorting them into alphabetical order. I’m not 100% sure tho
4 0
2 years ago
Read 2 more answers
Other questions:
  • Let's say that you handle the IT systems administration for your company. There's a server inside of your organization that chec
    14·1 answer
  • 1 what elements of composition are under your control in photoshop
    13·1 answer
  • Where will the CPU store data for easy access and quick retrieval during these computations?
    13·1 answer
  • Your network has had long power outages that have caused Hyper-V servers to shut down after the UPS battery is drained. When pow
    8·1 answer
  • How to solve a program that accepts a number as input and prints just the decimal portion
    15·2 answers
  • What is a single-user computer?
    8·1 answer
  • Explain in your own words how remote-access Trojans (RATs) work. How can these be used by attackers? How would a network adminis
    10·1 answer
  • A sum amounts to ₹2400 at 15% simple interest per annum after 4 years fond the sum.​
    9·1 answer
  • _____ refers to the programs that a device can run.
    9·1 answer
  • If a computer uses 500 characters, how many bits this system requires to give different code to all characters?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!