Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers
jgfujtf
#include
$vi sum.sh echo "enter the 1st no." read num1 echo "enter the 2nd no." read num2 sum= 'expr $num1 + $num2' echo "sum of the numbers is $sum"
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
Expressed as a sum in hexadecimal form, F + D = 1C.
int i, sum = 0; for (i=0; i<20; i+=2) sum+=i;
The set of numbers given are not suited for this since 9 and 35 are co-prime so that the GCF of the given set of numbers is 1. Using a GCF of 1 does not help.
To add hexadecimal numbers 2E and 34 without converting them into decimal, you first need to align the numbers by place value. Start from the rightmost digit and add each pair of digits, carrying over if the sum is greater than 15 (F in hexadecimal). In this case, 2E + 34 equals 62 in hexadecimal. The final answer is 62.
Write an. Algorthim. To. Find the. Sum. Of. First15 natural. Numbers
You add the numbers in a loop. Here is an example in Java:int sum = 0;for (int i = 1; i
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(); }
You can't write that as the sum of two prime numbers. Note: Goldbach's Conjecture (for expressing numbers as the sum of two prime numbers) applies to EVEN numbers.
write an assembly language program to find sum of N numbers
(4 x 9) + (5 x 9) = (9 x 9)c= 81
Count how many of the numbers are odd. If an odd number of them are odd, then their sum is odd. If an even number of them are odd, then their sum is even.
Write three numbers whose sum is 10 in all horizontal vertical and diagonal?