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
nordsb [41]
3 years ago
12

Write a program that takes in an integer in the range 20-98 as input. The output is a countdown starting from the integer, and s

topping when both output digits are identical. Ex: If the input is: 93 the output is: 93 92 91 90 89 88 Ex: If the input is: 77 the output is: 77 Ex: If the input is: 15 or any number not between 20 and 98 (inclusive), the output is:
Computers and Technology
1 answer:
S_A_V [24]3 years ago
7 0

Answer:

// program in C++.

#include <bits/stdc++.h>

using namespace std;

int main() {

//  variable  

int num;

cout<<"Enter the number between 20 and 98: ";

// read number

cin >> num;

while(num<20||num>98)

{

   cout<<"Wrong input!!enter number between 20-98 only:";

   cin>>num;

}

cout<<"The output is: ";

while(num % 10 != num /10)

{

// print numbers.  

cout<<num<<" ";

// update num.

num--;

}

// display the number.

cout<<num<<endl;;

return 0;

}

Explanation:

Read a number from user and assign it to variable "num".Check if entered number  is in between 20-98 or not.If input number is less than 20 or greater than 98 then  ask again to enter a number between 20-98 until user enter a valid input.Then print  the countdown from input number till both the digit of number are same.

Output:

Enter the number between 20 and 98: 99                                                                                    

Wrong input!!enter number between 20-98 only:12                                                                            

Wrong input!!enter number between 20-98 only:93                                                                            

The output is: 93 92 91 90 89 88

Enter the number between 20 and 98: 77                                                                                    

The output is: 77

You might be interested in
The database cannot be migrated to a different engine because sql server features are used in the application’s net code. The co
Nezavi [6.7K]

Answer:

Explanation:

B is correct

3 0
2 years ago
Put the following numbers in order from greatest to least:
monitta
Negativ numbers no matter how big, will always be less than zero. The correct Answer is A) 45,15,0,-11,-37
3 0
3 years ago
Carl wants to add a new slide to his PowerPoint presentation. Which option should he use?
djverab [1.8K]

Answer:

C on edg

Explanation:

I just took the review

8 0
3 years ago
Read 2 more answers
What is the e-file rejection error for an Invalid bank account or routing transit numbers?
dezoksy [38]
Usually when you encounter the problem you see the error code number "0019" for an invalid bank account or routing transit numbers.

Accounting information is the subject to which this is categorized. As soon as the IRS or (Internal Revenue Service) suspects any error, it will deny the return immediately. 
3 0
3 years ago
What is the atomic number of neonWhat do the following results from the TEST FOR LIFE tab indicate about the sample
Scorpion4ik [409]
The atomic number for Neon is 10.

I do not see the info for the second part of the question
6 0
3 years ago
Other questions:
  • La inteligencia o unidad lógica de un computador se denomina como??? Software, Hardware CPU o que, ayuda.....
    7·1 answer
  • This procedure protects against the loss of data
    5·1 answer
  • It proceeds the statement causes execution of the current loop iteration to end and commence at the beginning of the next loop.
    10·1 answer
  • You are manually configuring a tcp/ip host. another administrator gives you the router's ip address. what is the tcp/ip term for
    6·2 answers
  • What is the output of the second println statement in the main method, public class foo { int i ; static int s ; public sttic vo
    15·1 answer
  • If you need seamless access to the OS, ________ is better.
    8·1 answer
  • Plato Web Tech B Semester Test- I'll mark brainiest for answers to ALL
    9·1 answer
  • What is the best stratiget to avoid paying intrest in your credit cared
    13·1 answer
  • Fill in the blanks : To store 3 character a computer occupies...................bytes memory space​
    8·2 answers
  • Write an algorithm to display your name 10 times​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!