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
larisa86 [58]
2 years ago
12

(345.10 What is answer of this (345)10

Computers and Technology
1 answer:
love history [14]2 years ago
6 0
I don’t know what the question is
You might be interested in
Lottery Number Generator Design a program that generates a 7-digit lottery number. The program should have an Integer array with
Nikolay [14]

Answer:

/******************************************************************************

                             Online C++ Compiler.

              Code, Compile, Run and Debug C++ program online.

Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>

#include <string>

#include <sstream>

using namespace std;

bool equal(int sys[],int user[])

{

    for (int i=0;i<7;i++)

{

 if(sys[i]!=user[i]){

     return false;

 }

}

return true;

}

int main()

{

int sys[7];

int user[7];

int min=0

;int max=9;

string userinput;

while(0==0){

for (int i=0;i<7;i++)

{

    sys[i]=rand() % (max - min + 1) + min;

}

cout <<endl;

   cout<<"enter numbers"<<endl;

for (int i=0;i<7;i++)

{

 getline (cin,userinput);

    if(userinput=="x"){

        return 0;

    }

    else{

 stringstream(userinput) >> user[i];

   

    }

}

     cout<<"User number"<<endl;

for (int i=0;i<7;i++)

{

    cout << user[i];

}

    cout<<"system number"<<endl;

for (int i=0;i<7;i++)

{

    cout << sys[i];

}

if(equal(sys,user))

{

   cout<<"You won !"<<endl;

}else {

       cout<<"Try again :("<<endl;

}

}

   return 0;

}

Explanation:

Using c++ rand function generate a random number between 0-9.

Formula for random number is rand (max-min +1)+min.

Run this in a loop for 7 time and store each number to an array index in sys array which is for system generated number.

now using string take input from user and check if input is x close program else use stringstream to parse input string to int and store it in user array. Stringstream is a cpp header file used for parsing and handling of strin g inputs. Run this program in loop for 7 times.

Now create a function of type boolean denoted by "bool". This will take both arr as parameter and check if both are equal or not. It compares eac index of user array against each index of sys array and if both values are not equal returns false.

5 0
3 years ago
Print 'userNum1 is negative" if userNum1 is less than 0. End with newline Convert userNum2 to 0 if userNum2 is greater than 9. O
dlinn [17]

Answer:

#include <stdio.h>

int main()

{

   int userNum1;

   int userNum2;

   

   userNum1 = -1;

   userNum2 = 7;

   

   if (userNum1 < 0)

       printf("userNum1 is negative. \n");

       

   if(userNum2 > 9)

       userNum2 = 0;

   else

       printf("userNum2 is less than or equal to 9.\n");

   return 0;

}

Explanation:  

Initialize userNum1 and userNum2.

If userNum1 is less than 0, print 'userNum1 is negative" and end with newline.

if userNum2 is greater than 9, assign 0 to userNum2.

Otherwise, print "userNum2 is less than or equal to 9 and end with newline.

8 0
4 years ago
CAD software is used to_____. / create a printed document to send through a fax machine / enhance a photograph / design a buildi
Umnica [9.8K]
CAD software is used to design a building.
4 0
3 years ago
Read 2 more answers
Which memory device is most appropriate for backing up a computer’s hard drive?
Luba_88 [7]
It depends on how much storage. I usually connect mine to another hard drive.
4 0
4 years ago
Michelle works as a contractor for Gamer Geniuses, Inc., a company that creates educational games for children ages 3-10 years o
AlladinOne [14]

Answer:

Its syntax error

Explanation:

4 0
2 years ago
Other questions:
  • A company has a file server that shares a folder named Public. The network security policy specifies that the Public folder is a
    14·1 answer
  • ​_______ consists of the analysis​ tools, technologies, and processes by which marketers dig out meaningful patterns in big data
    7·1 answer
  • Missy creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her incom
    13·2 answers
  • Sometimes you're the dog, sometimes the fire hydrant, your thoughts?
    15·1 answer
  • Why does air have weight?
    6·2 answers
  • Which of the following is a group of email names and addresses used for mass distribution of a message?
    5·1 answer
  • Explain the basic method for implementing paging.
    13·1 answer
  • Today's Apple Mac computers run with the same internal hardware as the Windows-based PC.
    10·2 answers
  • Write a Java program called Decision that includes a while loop to prompt the user to enter 5 marks using the
    12·1 answer
  • You are considering using Wi-Fi triangulation to track the location of wireless devices within your organization. However, you h
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!