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
seraphim [82]
3 years ago
10

Please provide 10 unsigned decimal integers.

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

Answer:

// Program is written in C++

// Comments are used for explanatory purpose

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare variables

int digits [10]; int num;

int sum = 0; int average;

for(int I = 0; I<10; I++)

{

cout<<"Please enter an unsigned number: ";

input: cin>>num;

if(num>4,294,967,296 || num < 0)

{

cout<<"You did not enter an unsigned number or your number was too big.";

cout<<'\n'<<"Please try again: ";

goto input;

}

digits[I] = num;

// Calculate Sum

sum+=digits[I];

}

// Output numbers

cout<<"You entered the following numbers"<<'\n';

for(int j = 0;j<10;j++)

cout<<digits[j]<<" ";

// Calculating Average

average = sum/10;

// Output Sum

cout<<"The sum of these numbers is: "<<sum;

// Output Average

cout<<"The average is: "<<average;

return 0;

}

Explanation:

You might be interested in
How do I logout of Brainly on mobile? When I went to settings, it had the option to log out but it was grayed out.
poizon [28]
Just delete the app
8 0
4 years ago
Write a Java class with the following methods: getArray(int numStrings) is an instance method that takes command line input (use
mezya [45]

Answer:

Follows are the code to this question:

import java.util.*;//import packae for user-input  

public class Main//defining a class Main

{

public String[] getArray(int numString)//defining a method getArray

{

String[] name=new String[numString];//defining array of String values

Scanner in = new Scanner(System.in);// creating scanner class object for input values from user-end

for(int i=0;i<numString;i++)//defining for loop for input multiple values

{

System.out.print("Enter String Value :");//print message

name[i]=in.nextLine();//input values

}

return name;//return array values

}

public String getLongestString(String[] sArray)//defining a method getLongestString

{

int m=0,mi=0; //defining integer variables

for(int i=0;i<sArray.length;i++)//defining for loop for check the longest value in array

{

if(m<sArray[i].length())//defining if block that checks m varaible value greater then sArray length  

{

m=sArray[i].length();//use m to hold sArray length

mi=i;//use max_index to hold i that is loop value

}

}

return sArray[mi];//return Longest value

}

public static void main(String[] args)//defining main method

{

Main s=new Main();//Creating object of main class    

String[] n;//defining string variable n  

n=s.getArray(5);//use n varaible to call getArray method and store its value

System.out.println("Longest value is: "+s.getLongestString(n));//use print method to call getLongestString method

}

}

Output:

please find attached file.

Explanation:

In the given java program code, inside the main class two method that is "getArray and getLongestString", is defined, in which the "getArray" method uses an integer variable in its parameter and inside the method, an array is defined that use a  scanner class for input array value.

  • In the "getLongestString" pass as a parameter and inside the method, two integer variable "m and mi" is defined that use in the loop to return the longest string value.
  • In the class main method is to define that creates a class object and call the above method and use the print method to return its value.  

4 0
3 years ago
1. What is the central idea of the section "Service Record." Use two text details to
Vladimir [108]

Answer:

Service record is the record that is used to track the record of service of the employ in an organization.

Explanation:

The idea behind the service record is to maintain the whole detail of record of the person during his employment including, personnel information,  record related to his promotions and posting, salary record etc.

8 0
3 years ago
What is information technology?
nirvana33 [79]
Information technology is the application of computers to store, retrieve, transmit and manipulate data, often in the context of a business or other enterprise. 
7 0
3 years ago
In the Stop-and-Wait flow-control protocol, what best describes the sender’s (S) and receiver’s (R) respective window sizes?
kolbaska11 [484]

Answer:

The answer is "For the stop and wait the value of S and R is equal to 1".

Explanation:

  • As we know that, the SR protocol is also known as the automatic repeat request (ARQ), this process allows the sender to sends a series of frames with window size, without waiting for the particular ACK of the recipient including with Go-Back-N ARQ.  
  • This process is  mainly used in the data link layer, which uses the sliding window method for the reliable provisioning of data frames, that's why for the SR protocol the value of S =R and S> 1.
3 0
3 years ago
Other questions:
  • Can a computer evaluate an expression to something between true and false? Can you write an expression to deal with a "maybe" an
    13·2 answers
  • While browsing through the mall, you are given samples of the latest perfumes from different designers. This is an example of wh
    14·1 answer
  • Which two statements are true regarding the user exec mode? (choose two.)?
    6·1 answer
  • Shakespeare’s complete works have approximately 3.5 million characters. Which is bigger in file size: Shakespeare’s complete wor
    5·2 answers
  • Trojan Horse is a malicious program and a virus is a program. <br><br> a. True <br> b. False
    6·1 answer
  • Pls help me!!!!!!!!!!!!!
    5·2 answers
  • What can act as a buffer against unemployment
    11·1 answer
  • Who has gotten a random file link from someone? What file does it contain?
    8·2 answers
  • Write code which takes two inputs from the user, a number of sides followed by a side length, then creates a regular polygon wit
    10·2 answers
  • Which access object cannot be used to enter or edit data
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!