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
soldier1979 [14.2K]
3 years ago
5

What city was the capital of Portuguese colonies in Asia

Computers and Technology
1 answer:
olga2289 [7]3 years ago
7 0

Answer:

Goa was the capital of Portuguese colonies in Asia.

Explanation:

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
Computer networks make setting appointments easier by _____.
Sunny_sXe [5.5K]

Probably providing a common calendar

5 0
3 years ago
Read 2 more answers
Look at the picture lol
andrey2020 [161]

Answer:

Zoom in more please and than i can help

Explanation:

6 0
3 years ago
Read 2 more answers
Which security scanner runs in a web browser and doesn't require that you install a product before scanning
balandron [24]

Answer:

It’s OSI. also your question cut off lol

4 0
3 years ago
Write the definition of a void function that takes as input an integer and outputs two times the number if it is even; otherwise
KatRina [158]

Answer:

Written in C++

void number(int n){

if(n%2 == 0)

cout<<2 * n;

else

cout<<5 * n;

}

Explanation:

The programming language is not stated.

However, I answered using C++

This line defines the function as void

void number(int n){

This line checks if the number is even

if(n%2 == 0)

If yes, it doubles the number and prints the output

cout<<2 * n;

If otherwise,

else

It multiplies the number by 5 and prints the output

cout<<5 * n;

}

To call the function from main, use:

number(n);

Note than n must be declared as integer

See attachment

Download cpp
6 0
3 years ago
Other questions:
  • What is Blender's default save directory for movie AVI files?
    9·2 answers
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • Your program will demonstrate use of arrays, searching an array, using methods, passing parameters by reference, returning value
    13·1 answer
  • when two pieces of cui or other unclassified information are posted online together or attached together in an email and result
    5·1 answer
  • you are the manager of a virtual team that is working on a project. You uploaded a Word document to an OneDrive account that you
    9·1 answer
  • 8.5 question 2 edhesive
    11·1 answer
  • "What technology will examine the current state of a network device before allowing it can to connect to the network and force a
    6·1 answer
  • Im getting hit offline can someone help or give me some advice
    6·1 answer
  • 50 POINTS! What can be viewed in the Tasks folder? Check all that apply.
    13·2 answers
  • What is a man-in-the-middle attack​
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!