answersLogoWhite

0


Best Answer

I cannot do your homework, if you cannot explain it properly.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write algorithm to find the sum of the digits in a given 4 digit no ex- no is 8516 then 8 5 1 6?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a pseudo code to find the sum of digits of a given number reducing them to a single digit?

5


A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


What are the characteristics of an algorithm. Describe with an example?

An algorithm is a stepwise sequence of operations that can be performed to solve a problem. The operations are expected to be 'simple', so they can be performed mechanically.A simple example algorithm is "how to find the largest number in a list of numbers":- look at the first number and write it down as the largest-so-far- for each remaining number in the list:- - replace largest-so-far with this number if this number is larger- when you have compared all the numbers, largest-so-far is the largest number in the listA less trivial algorithm is the one people learn in school for multiplying multi-digit numbers, called "long multiplication" or "grade-school multiplication". It becomes rather long if you write down all the steps (as you would need to for an algorithmic description), but it involves multiplying each digit in the first number with each digit in the second number and summing the partial results.Here the simple operation is multiplying two single digits, which you are expected to know how to do, and by using the algorithm you can extend the knowledge of how to multiply single digits to multiply numbers with any number of digits.See related links.


Write an algorithm and draw a corresponding flowchart to search a number in the given list of numbers and also display its position?

please give me an algorithm and a corresponding flow chart that displays list of numbers from 1 to 20.


Algorithm to count the digits in a given number?

def digits(x):""" Return amount of digits of x. """y = math.log10(x)if y % 1 0:return int(y)else:return int(math.floor(y) + 1)

Related questions

Write a pseudo code to find the sum of digits of a given number reducing them to a single digit?

5


A Write the algorithm to concatenate two given strings?

a write the algorithm to concatenate two given string


What are the smallest possible 7-digit numbers by repeating the digits given 58271?

-58264


The sum of the digits of a two digit number is 9 the number obtained by reversing the order of the digits of the gven numbers exceeds the given number by 27 find the given numbers?

3 and 6


What is the smallest 5 digit number using the digits 0 9 1 6?

Starting from the left, use the smallest possible digit for each position. Note that only four digits are given, so we can assume that we are free to choose the fifth digit. The first digit can't be "0", so use the next-smallest digit: "0". The next digits would be "169". For the final digit, add an additional zero.


What are the characteristics of an algorithm. Describe with an example?

An algorithm is a stepwise sequence of operations that can be performed to solve a problem. The operations are expected to be 'simple', so they can be performed mechanically.A simple example algorithm is "how to find the largest number in a list of numbers":- look at the first number and write it down as the largest-so-far- for each remaining number in the list:- - replace largest-so-far with this number if this number is larger- when you have compared all the numbers, largest-so-far is the largest number in the listA less trivial algorithm is the one people learn in school for multiplying multi-digit numbers, called "long multiplication" or "grade-school multiplication". It becomes rather long if you write down all the steps (as you would need to for an algorithmic description), but it involves multiplying each digit in the first number with each digit in the second number and summing the partial results.Here the simple operation is multiplying two single digits, which you are expected to know how to do, and by using the algorithm you can extend the knowledge of how to multiply single digits to multiply numbers with any number of digits.See related links.


What is truncat?

Truncation is an operation whereby a long decimal representation of a number is stopped after a given number of digits, taking no account of the digit which follows. This is different from rounding where the final digit retained may be increased by 1 if the following digits make a number which is greater than half a unit.


How many significant digits are in 5.060?

The first step in assessing the number of significant figures is to identify the greatest non-zero digit. In this case it is five. Then you simply count on until the last digit given. In this case there are 3 more digits after the 5. Therefore the number has been given to 4 significant figures.


Write a c program to add the digits of a given no?

THIS IS ONLY FOR UPTO A FIVE DIGIT NO. BY ROHAN ARORA#include#includevoid main(){int a,n,s,sum=0;clrscr();printf("Enter the number between 1 to 5 digits\n");scanf("%d",&a);while(a!=0){n=a%10;sum=sum+n;a=a/10;}printf("The sum of digits of the given numberis %d",sum);getch();}


How can you generate a palindrome from a given number?

You write the number and then follow it with the digits in reverse order.


You are a 7 digit number none of your digits are alike your million digit is 3 and your ones digit is 7 the digit 4 is beside 6 and 8 if the sum of your digits is 33 what number am 2?

There's not enough information to narrow this down to one number. Given 3, 4, 6, 7, 8 and a total of 33, the other two digits are 0 and 5. 3,648,507 qualifies. So does 3,508,467. So do many others.


Algorithm for to find sum of individual digits of a positive integer?

enter the number whose digits are to be added num is the given value num=0! k=num%10 sum=sum=k k=num/10 num=k print the sum of the digits