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
maria [59]
3 years ago
13

Ashton assigned a string value to a variable. Which program statement should he use?

Computers and Technology
1 answer:
ryzh [129]3 years ago
6 0
The second one
bc it looks correct

You might be interested in
What is the space complexity of the algorithm?ArithmeticSeries(list, listSize) { i = 0 arithmeticSum = 0 while (i < listSize)
blondinia [14]

Answer:

O(n) which is a linear space complexity

Explanation:

Space complexity is the amount of memory space needed for a program code to be executed and return results. Space complexity depends on the input space and the auxiliary space used by the algorithm.

The list or array is an integer array of 'n' items, with the memory size 4*n, which is the memory size of an integer multiplied by the number of items in the list. The listSize,  i, and arithmeticSum are all integers, the memory space is 4(3) = 12. The return statement passes the content of the arithmetic variable to another variable of space 4.

The total space complexity of the algorithm is "4n + 16" which is a linear space complexity.

7 0
3 years ago
A method countDigits(int num) of class Digits returns the remainder when the input argument num(num > 0) is divided by the nu
sertanlavr [38]

Answer:

#include <iostream>

using namespace std;

class Digits

{

   public:

   int num;

   int read()       //method to read num from user

   {

       cout<<"Enter number(>0)\n";

       cin>>num;

       return num;

   }

   int digit_count(int num)  //method to count number of digits of num

   {

       int count=0;

       while(num>0)    //loop till num>0

       {

           num/=10;

           count++;   //counter which counts number of digits

       }

       return count;

   }

   int countDigits(int num)   //method to return remainder

   {

       int c=digit_count(num); //calls method inside method

       return num%c;  

   }

};

int main()

{

   Digits d;    //object of class Digits is created

   int number=d.read();   //num is read from user

   cout<<"\nRemainder is : "<<d.countDigits(number);  //used to find remainder

   return 0;

}

Output :

Enter number(>0)

343

Remainder is : 1

Explanation:

As program is missing to find errors , a logically write program is written to find the remainder when a number is divided by its number of digits. A class  Digits is constructed which has public variable num and methods read(), digit_count(), countDigits().

  • read() - This method reads value of num from the user and return num.
  • digit_count() - This method takes a integer as parameter and counts the number of digits of a number passed as argument. while loop is used to increement the counter until num<0. This returns the value of count.
  • countDigits() - This method takes a integer as a parameter and returns remainder when the argument is divided by number of  digits of argument. Number of digits is calculated by using method digit_count().

At last in main method , object of Digits class is created and its methods are used to find the output.

7 0
4 years ago
What careers are most likely to require business skills
olchik [2.2K]

i would say maybe an accountant, entrepreneur, business reporter, or something like that.

8 0
3 years ago
The part of the computer that performs the calculations that enable the computer to function and is sometimes referred to as the
VMariaS [17]
CPU, the central processing unit, can take and understand instructions and output a result according to its instructions. A core component of a CPU is the APU, an arithmetic processing unit, this is responsible for all mathematical calculations and comparisons.    <span />
6 0
4 years ago
Read 2 more answers
When sending a file as an e-mail attachment, the save &amp; send option can be found by clicking on which tab? insert file home
aleksklad [387]
I belive that it is .insert.
5 0
3 years ago
Other questions:
  • Why is it important for element IDs to have meaningful names?
    7·1 answer
  • What is the advantage of using a high-level language over machine language for writing computer programs?
    12·2 answers
  • ____ refers to data, applications, and even resources stored on computers accessed over the Internet. Answer
    5·1 answer
  • (Please answer! Correct answer gets brainliest!)
    5·2 answers
  • What is blogging
    15·2 answers
  • SQL statement to verify the updated name field for the publisher with ID 5 SELECT * FROM Publisher WHERE PubID=5;
    7·1 answer
  • PLEASE HELP ASAP!!
    11·1 answer
  • Consider the following class definition.
    7·1 answer
  • What help the ict in your life?and write own idea three or four sentence
    12·1 answer
  • What is computer hadware​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!