answer.
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
Vesnalui [34]
2 years ago
14

Se dau lungimile a N cuvinte (0 < N ≤ 5 000), formate din cel puțin un caracter. Să se afișeze lungimea minimă necesară R a u

nui rând dintr-o pagină, astfel încât pe fiecare rând lungimea cumulată a cuvintelor să fie exact R (fără spații între ele). Cuvintele nu au voie să fie despărțite.
Computers and Technology
1 answer:
IceJOKER [234]2 years ago
6 0

Answer:

Explanation:

Clearer rendering reads;

"Give the lengths of N words (0 <N ≤ 5 000), consisting of at least one character. Display the minimum required length R of a line on a page, so that on each line the cumulative length of the words is exactly R (no spaces between them). Words are not allowed to be separated".

You might be interested in
Sang ayon kaba sa pahayag na walang sinuman ang nabubuhay para sa sarili lamang? bakit?
d1i1m1o1n [39]
What language is this?
7 0
2 years ago
Writing in Java, write a program that prompts the user to input an integer and then outputs both the individual digits of the nu
larisa [96]

Answer:

//Here is code in java.

import java.util.*;

class Main

{

public static void main (String[] args) throws java.lang.Exception

{

   try{

       int in;

     //scanner class object to read the input

    Scanner scr=new Scanner(System.in);

     // variable to keep running total

    int total=0;

    System.out.println("please enter an Integer:");

     // read the input first time

    in=scr.nextInt();

    System.out.print("individual digits of "+in+" is ");

    if(in<0)

    {

        in=-(in);

    }

   

 

     //call the function to print the digits of number

   print_dig(in);

   System.out.println();

    //calculate the sum of all digits

   do{

       int r=in%10;

       total=total+r;

       in=in/10;

   }while(in>0);

    //print the sum

   System.out.println("total of digits is: "+total);

     

   }catch(Exception ex){

       return;}

}

 //recursive function to print the digits of number

public static void print_dig(int num)

{  

    if(num==0)

    return;

    else

    {

    print_dig(num/10);

    System.out.print(num%10+" ");

    }

}

}

Explanation:

Read a number with the help of object of scanner class.if the input is negative

then make it positive number before calling the function print_dig().call

the recursive method print_dig() with parameter "num".It will extract the digits

of the number and print then in the order. Then in the main method, calculate

sum of all the digits of number.

Output:

please enter an Integer:                                                                                                  

3456                                                                                                                      

individual digits of 3456 is 3 4 5 6                                                                                      

total of digits is: 18

please enter an Integer:                                                                                                  

-2345                                                                                                                      

individual digits of -2345 is 2 3 4 5                                                                                      

total of digits is: 14

6 0
2 years ago
Write code which takes a user input of a String and an integer. The code should print each letter of the String the number of ti
il63 [147K]

import java.util.*;

public class myClass {

public static void main(String args[]) {

Scanner scan = new Scanner(System.in);

System.out.print("Input a String: ");

String str = scan.nextLine();

System.out.print("Input an integer: ");

int num = scan.nextInt();

for(int i=str.length()-1; i>=0; i--) {

for(int j=0; j<num; j++) {

System.out.print(str.charAt(i));

}

}

}

}

8 0
2 years ago
Cloud-based services can open doors to leveraging Artificial Intelligence (AI) without dramatically increasing risk. Which clien
vladimir1956 [14]

Answer:

Explanation:

The clients that would be best suited for this opportunity would be small business or business' that do not have the hardware/space resources necessary to create the computing power that they need. Instead, they can simply pay for these cloud-based services which provide all of the necessary computing/hardware power and resources necessary so that the company can easily fulfill all of their tasks without any problems. Bigger companies can easily pay for and implement their own hardware to solve their problems which may benefit them even more in the long-term.

7 0
1 year ago
In order to write a successful algorithm, you must first be able to:
svp [43]
First define the problem
4 0
2 years ago
Other questions:
  • Write a program in c or c++ to perform different arithmeticoperation using switch statement .the program will take two inputinte
    10·1 answer
  • Why is continual user involvement a useful way to discover system requirements? Under what conditions might it be used? Under wh
    5·1 answer
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • Imagine that you have configured the enable secret command, followed by the enable password command, from the console. You log o
    12·1 answer
  • You're the sole IT employee at your company. Most of the computers in your fleet are Windows machines. Your boss wants you to se
    11·1 answer
  • Create an abstract Division class with fields for a company's division name and account number, and an abstract display() method
    14·1 answer
  • given the numerical value 1010101.11, which of the following number systems is most likely represented.
    11·1 answer
  • 15. It is the process of capturing data or translating information to recording format
    12·1 answer
  • Given two integers as user inputs that represent the number of drinks to buy and the number of bottles to restock, create a Vend
    8·1 answer
  • When adopting and implementing a Software as a Service (SaaS) platform such as Salesforce for your business, which responsibilit
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!