Answer:
x = int(input("Enter an integer: "))
y = int(input("Enter another integer: "))
if x > y:
for number in range(y+1, x):
print(number, end=" ")
elif y > x:
for number in range(x+1, y):
print(number, end=" ")
else:
print("There are no integers between {} and {}".format(x, y))
Explanation:
*The code is in Python.
Ask the user to enter the two integers, x and y
Since we want our program to run regardless of which entered value is larger, we need to compare the numbers to be able to create the loop that prints the numbers.
Check if x is greater than y. If it is, create a for loop that iterates from y+1 to x-1 and print the numbers
Otherwise, check if y is greater than x. If it is, create a for loop that iterates from x+1 to y-1 and print the numbers
If none of the previous part is executed, print that there are no integers between
I do and it’s going alright; would recommend. Here’s what I think in bullet points.
- Good aesthetic design. Weave-like texture is nice and somewhat opulent.
- Good performance; you can overclock the i7 CPU.
- Battery life is at the upper end of the spectrum.
- No USB Type A Ports, big downside.
- Graphics are about 1000 points above industry average (3D Mark Fire Spark)
- Uses an SSD rather than a HDD; much quicker load time.
- I’d go for the $1,899 personally; it’s worth the extra money.
Thanks.
The answer to this question is simple
False
This is because there are multiple was to Save, Open, and Close a Word Document
Hope It Helps
Answer:
a)
for(x=0;x<20;x=x+2)
cout<< x << ' ';
cout<< endl ;
<u>Output</u>
0 2 4 6 8 10 12 14 16 18
In this code we are initialing x with 0, check if it is less than 20, then printing the value 0.
Then we increment x value with 2 and check and print again until the x value tends to be equal or more than 20.
<u>C++ program for verifying</u>
#include <iostream>
using namespace std;
int main()
{
int x;
for( x=0;x<20;x=x+2)
cout<< x << ' ';
cout<< endl ;
return 0;
}
<u>Output</u>
0 2 4 6 8 10 12 14 16 18
(You can check on any ide for confirmation)
b)
i=10;
for (;i>0; i =i/2;)
cout<< i;
This code will produce error expected ‘)’ before ‘;’ token
for(;i>0; i =i/2;)
because for loop consist three parameters and in this loop there are 4 parameters.
If we remove semicolon after i/2,
for(;i>0; i =i/2)
then it will produce an output.
10 5 2 1
<u>C++ program for verifying</u>
#include <iostream>
using namespace std;
int main() {
int i=10;
for(;i>0; i =i/2;)
cout<< i;
return 0;
}
<u>Output</u>
Error-expected ‘)’ before ‘;’ token
for(;i>0; i =i/2;)
Answer:
select * from resources
where rate between 10 and 15
order by rate (ASC|DESC)
Explanation:
On Chegg + SQL textbook
(Here we are using * keyword to fetch all the records from resource table and between operator is used to fetch values between two vaues(values included).
Order By clause is used to sort the values and ASC is used with order by clause to sort in ascending order and DESC is used to sort in Descending Order.
By default if we do not specify anything then it will take ASC.