answersLogoWhite

0

it's simple:

{

int a,b,c,d;

printf("enter the numbers");

scanf("%d %d %d" &a &b &c);

d=a+b+c;

printf("the sum is=%d" d);

}

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you calculate sum of digit of a given three digit number in visual basic?

simple program


What is an algorithm to calculate the sum of the digits of a three digit number?

algorithm is a way to solve your problem


How can you find the nth square number?

Three ways.. Multiply n by itself. Calculate Sum[2i+1,{i,0,n-1}] Calculate Sum[n,{i,1,n}]


Write a program to calculate the sum of the sequence number from 1 to n loop?

public static final int getSum(final int n) { int sum = 0; for(int i = 1; i <= n; ++i) { sum += i; } return sum; }


How do you write a program in qbasic to input 64751315 to sum?

In QBASIC, you can write a simple program to input the number 64751315 and sum its digits as follows: DIM sum AS INTEGER sum = 0 INPUT "Enter a number: "; number FOR i = 1 TO LEN(number) sum = sum + VAL(MID$(number, i, 1)) NEXT PRINT "The sum of the digits is "; sum This program prompts the user to input a number, iterates through each digit, converts it to an integer, and adds it to the total sum, which is then printed out.


What is The quotient of four and the sum of a number and three?

The quotient of the sum of a number and three, and four is seven


What is the answer of write a program to calculate sum of all even numbers starting from 20 tell there sum exceeds 1000?

To calculate the sum of all even numbers starting from 20 until the sum exceeds 1000, you can initialize a variable for the sum and a counter starting at 20. In a loop, add the counter to the sum and increment the counter by 2 (to keep it even) until the sum exceeds 1000. The final sum will be the total of all even numbers added. Here's a simple pseudocode example: sum = 0 number = 20 while sum <= 1000: sum += number number += 2


What is the sum of four and the product of three and a number x?

The sum of four and the product of three and a number xxxx.


How do you you write the sum of a number and 3 in algedra in expression?

n+3 the sum of a number and three means a number plus three.


Write a program to find the sum of all positive number and terminate the program when sum exceed 999?

int sum = 0; int n = 0; while( sum <= 999 ) { sum += (++n); }


How do you find the sum of the three consecutive numbers?

Their sum is three times the middle number.


What are the three odd primes with the sum of 14?

There are not three odd primes with the sum of 14. The sum of three odd primes will be an odd number.