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
ruslelena [56]
3 years ago
7

Write a programme to find the sum of first three cube number?

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

// Simple Java program to find sum of series

// with cubes of first n natural numbers

import java.util.*;

import java.lang.*;

class GFG {

/* Returns the sum of series */

public static int sumOfSeries(int n)

{

int sum = 0;

for (int x = 1; x <= n; x++)

sum += x * x * x;

return sum;

}

// Driver Function

public static void main(String[] args)

{

int n = 5;

System.out.println(sumOfSeries(n));

}

}

// Code Contributed by Mohit Gupta_OMG <(0_o)>

You might be interested in
Many computer magazines and Web sites present comparisons of several DBMSs. Find one such DBMS comparison article and compare th
Marianna [84]

<u>In DBMS comparison normally end user compare the following this</u>

1. Cost effective.

2. How much storage capacity

3. Number of concurrent users or connection.

4. Extend storage capacity

<u>Explanation:</u>

Normally end users compare DBMS such as oracle, MySQL, sqlserver, MS access, and postages sql and mongo db.

If it is document oriented or image search best is mongo dB or clouch db, for best relationship management of DBMS such as oracle, MySQL server extra.

For colonial adventure tours and DBMS I would suggest either mongo dB or oracle all depends on organization.

7 0
3 years ago
If a cache access requires one clock cycle and dealing with cache misses requires an additional five clock cycles, which of the
DedPeter [7]

Answer:

B. 80%

Explanation:

To assertain:

1 hit takes 1 clock cycle while 1 miss takes 6 clock cycles

Assuming that:

  1. we have 100 accesses in total,
  2. p are hits,
  3. 100 - p are misses

So, p + (100 - p)*6 = 200\\ \\p+600-6p = 200\\\\-5p + 600 = 200\\\\5p = 600 -200\\\\p = \frac{400}{5} \\\\p= 80

Hence, option B. 80% will result in an effective access time of 2 clock cycles.

5 0
3 years ago
If you want to tune into a radio station that is carried by a signal with wavelength 3.0 meters, what channel would you choose?
Over [174]

Answer:  The radio should be tuned to 100. 0 Mhz.

Explanation:

As radio waves are electromagnetic waves, like x-rays, UV rays, and all the wavelengths of visible light, they propagate in the free space at the speed of light: 3. 10⁸ m/s.

At any wave, there is a fixed relationship between the distance travelled by the wave along one cycle (which is called wavelength ) and the speed at which the wave oscillates (which is called the frequency of the wave), with the speed at which the wave propagates, as follows:

λ (wavelength) =  v (speed) / f (frequency)

Replacing by the values, and solving for frequency, we have:

f = 3. 10⁸ m/seg / 3 m = 10⁸ 1/sec = 10⁸ Hz = 100. 0 Mhz

This is the radio channel to which must be tuned in order to listen the station with a wavelength of 3 m, in the FM band.

6 0
3 years ago
in python Write a program that prompts the user to enter a hex character and displays its corresponding decimal integer python
Archy [21]

Answer:

Here is some that I know. The code is below:

#accepting input hex_num=input() #checking if it is a number if(hex_num>='0' and hex_num<='9'):     #printing that number     print(hex_num) #checking

Explanation:

I hope this helps

8 0
3 years ago
QUESTION
Lady_Fox [76]

Answer:

Explanation:

#include <iostream>

using namespace std;

int main ()

{

   int responses[30],count[6];

   int score = 0;

   string resp = " ";

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

   {

    responses[i] = 0;

   }

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

   {

    count[i,1]=0;

    count[i,2]=0;

    count[i,0]=0;

   }

   while ((resp != "Y") && (resp != "y"))

   {

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

    {

        while ((score > 5) || (score < 1))

           {

            cout << "Student " << (i+1)<< " please enter a value (1-5):";

            cin >> score;

        }

           responses[i] = score;

           if((score > 5)||(score<1))

           {

               if(score==1) count[1]++;        

               if(score==2) count[2]++;        

               if(score==3) count[3]++;        

               if(score==4) count[4]++;        

               if(score==5) count[5]++;        

           }

           score = 0;

    }

    cout<< "Response               Frequency              Percentage"<<endl;;

    cout<< "    1                      "<<count[1]<<"               "<<(count[1]/30)<<"%"<<endl;

    cout<< "    2                      "<<count[2]<<"               "<<(count[2]/30)<<"%"<<endl;

    cout<< "    3                      "<<count[3]<<"               "<<(count[3]/30)<<"%"<<endl;

    cout<< "    4                      "<<count[4]<<"               "<<(count[4]/30)<<"%"<<endl;

    cout<< "    5                      "<<count[5]<<"               "<<(count[5]/30)<<"%"<<endl;

    cout<< "Do you want to exit? Press Y to exit any other key to continue: ";

    cin>> resp;

   }

   return 0;

}

8 0
3 years ago
Other questions:
  • How much does a Canon PowerShot G7X cost in America?
    14·1 answer
  • What is used for World Wide Web?
    7·1 answer
  • Refer to the exhibit, a technician applies the configuration in the exhibit to an unconfigured router. To verify the configurati
    13·1 answer
  • Subana is writing a program which will calculate the mean average of a set of numbers by adding the numbers and dividing the res
    11·2 answers
  • A spreadsheet has some values entered: Cell A1 contains 10, cell A2 contains 14, A3 contains 7. You enter in cell A4 the followi
    8·1 answer
  • In a ______topology, every device has exactly two neighbors for communication purposes. A failure in any cable or device can tak
    15·2 answers
  • What is a benefit of the rise in citizen journalism? Multiple answer choice below
    13·1 answer
  • ---------------------- use of the Internet to access programs and data on computers that are not owned and managed by the user o
    9·1 answer
  • MmfbfMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
    14·1 answer
  • Difference between copy command and cut command
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!