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
pentagon [3]
2 years ago
13

write a function that given an integer n returns the smallest integer greater than n the sume of whose digits is twice as big th

e as the sum of digits of N
Computers and Technology
1 answer:
USPshnik [31]2 years ago
3 0

The code below is written in javascript which gives us the integer,

<h3>The function code is</h3>

function solution (num){


//Javascript function


var x=0,sum=0,a,b;


var d=""; //variable declaration


var digits = num.toString().split('');


var Individual = digits.map(Number);


//console.log(Individual);


for (var i=0;i<Individual.length;i++)


{//For loop


x=x+Individual[i];


}


var y=x*2;


for(var i=0;i<Individual.length;i++)


{


sum=sum+Individual[i];


d=""+d+Individual[i];


if(sum==y)


break;


if(i==Individual.length-1)


{


i=-1;


continue;


}


}


console.log("the value is "+d);


}


var number = prompt("enter the number");


//Asking user for value...


console.log("the number is");


console.log(number);


solution(num

For more information on javascript, visit

brainly.com/question/16698901?referrer=searchResults

You might be interested in
What component can be used for user input or display of output?
kogti [31]

Answer:

JTextField

Explanation:

JTextField is a Swing control which can be used for user input or display of output. It corresponds to a textfield and can be included with other controls such as JLabel, JButton,JList etc. on a comprehensive user interface which is application dependent. JTextField supports a read-write mode where the user can enter a value and it also supports a read-only mode which can be used to display non-editable output to the user.

4 0
3 years ago
True / Fasle
Liono4ka [1.6K]

Answer:

False

Explanation:

3 0
3 years ago
Your organization has an Active Directory domain. One of the users, Bill, should not have read access to a folder named Accounti
Alborosie

Answer: D. Deny read access to the Accounting folder for Bill through shared access security.

Explanation:

The statement that describes how to stop Bill from having read access to the folder without impacting any other users on the network is to deny read access to the Accounting folder for Bill through shared access security.

It should be noted that the local access security cannot be used in this case because the folder is shared from a network server that is within the active directory domain.

5 0
2 years ago
Heres a survey
vodka [1.7K]

food.

I'm a child of God snatching lost souls out of Hell

bake

I go to church

some is to much information to give thx and have a blessed day

4 0
2 years ago
Read 2 more answers
The creation of​ __________ with digital media allows for large quantities of numerical or textual data to be searched online by
ANEK [815]

Answer:

Option A- Reference materials

Explanation:

Reference Materials A digital reference library that provides more than 600 high-quality reference books from the world's leading publishers to be searched online by data points and trends

3 0
3 years ago
Read 2 more answers
Other questions:
  • Desktop, laptop, and tablet computers, and mobile devices are classified as _______.
    7·1 answer
  • In internet terminology, what is the term, .com, called?
    12·2 answers
  • By default, the windows desktop display
    12·1 answer
  • Mirrors on cars exist to____.
    7·2 answers
  • Employers will check you out on social media sites like Facebook, MySpace, and Twitter.
    6·2 answers
  • If Word finds a potential error in a document, a red, green, or blue wavy underline flags the problem.
    14·1 answer
  • A digital designer might do computer animation or video games true or false
    13·2 answers
  • PYTHON:Given the dictionary, d, find the largest key in the dictionary and associate the corresponding value with the variable v
    12·1 answer
  • IN EXCEL, File, menu , edit, insert are all located in ?
    7·1 answer
  • What is software?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!