answersLogoWhite

0

Xra a [(making the accumulator zero) or you can also write

mvi a,00 but will probably take more t-states]

lxi h dooo(can be any other address)give the range(n)

mov b,m

mvi c,01

again: add c

inr c

dcr b

jnz again [loop]

inx h

mov m,a

hlt

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

To find LCM of n numbers using 8085 programs?

sample program in sum of the series using the formula for s=n/2[2a+{n-1}d] in 8085


What is the Sum of the 1st 50 odd numbers?

The sum of the first 50 odd numbers is 2,500. This can be calculated using the formula for the sum of the first ( n ) odd numbers, which is ( n^2 ). For ( n = 50 ), the sum equals ( 50^2 = 2,500 ).


Program to find sum of n numbers using recursion function?

int sum(n) { if (n==0) return 0; else return n+sum(n-1); }


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


C program to find sum of n number using for loop?

#include<stdio.h> void main() { long long int sum=0,n,i,b; printf("How many numbers do you want to add?\n"); scanf("%lld",&n); printf("Enter those %lld numbers\n",n); for(i=0;i<n;i++) { scanf("%lld",&b); sum=sum+b; } printf("Sum of all the numbers you entered is %lld",sum); getch(); }


How do you get the sum of consecutive cubed numbers?

The sum of the first n cubed numbers is: [n*(n+1)/2]2 which is the same as the square of the sum of the first n numbers.


What is the algorithm for sum of n even numbers?

The sum of the first ( n ) even numbers can be calculated using the formula ( S = n(n + 1) ). This is derived from the fact that the ( n )-th even number is ( 2n ), and the sum of the first ( n ) even numbers is ( 2 + 4 + 6 + \ldots + 2n ). By factoring out 2, the sum simplifies to ( 2(1 + 2 + 3 + \ldots + n) ), which is ( 2 \times \frac{n(n + 1)}{2} = n(n + 1) ).


How do you find the average of n numbers?

The average of n numbers = (sum of n numbers) / (count of n numbers).


What is the sum of the numbers from 1 to 60?

The sum of the numbers from 1 to 60 can be calculated using the formula for the sum of an arithmetic series: ( S_n = \frac{n(n + 1)}{2} ), where ( n ) is the last number in the series. For the numbers 1 to 60, ( n = 60 ). Thus, the sum is ( S_{60} = \frac{60(60 + 1)}{2} = \frac{60 \times 61}{2} = 1830 ). Therefore, the sum of the numbers from 1 to 60 is 1830.


C program for displaying perfect numbers using nested loop?

for (n=1; n<1000; ++n) { for (sum=0, k=1; k<=n/2; ++k) if (n%k==0) sum += k; if (sum==n) printf ("%d\n", n); }


What is the c plus plus program for printing sum to n natural numbers?

main() { int i, n, sum=0; cout<<"Enter the limit"; cin>>n; for(i=0;i<=n;i++) sum=sum+i; cout<<"sum of "<<n<<" natural numbers ="<<sum; getch(); }


What is the sum of the 100th row of pascals triangle?

Sum of numbers in a nth row can be determined using the formula 2^n. For the 100th row, the sum of numbers is found to be 2^100=1.2676506x10^30.