answersLogoWhite

0

#include<stdio.h>

#include<process.h>

#include<stdlib.h>

void main(int argc, char *argv[])

{

int i,result=0;

if(argc<3)

{

puts("Enter atleast two numbers!!");

exit(1);

}

else

{

for(i=0;i<argc;i++)

result+=atoi(argv[i]);

}

printf("Result is %d",result);

}

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

What do you call the result of adding two numbers?

The sum.


what is the answer on how to make a program that will ask the user to enter four number and display the sum and average of that four number?

To create a program that asks the user to enter four numbers and then displays the sum and average, you can follow these steps: First, prompt the user to input four numbers and store them in variables. Next, calculate the sum by adding these numbers together. Finally, compute the average by dividing the sum by four, and then display both the sum and the average to the user. Here's a simple example in Python: numbers = [float(input(&quot;Enter number {}: &quot;.format(i+1))) for i in range(4)] total = sum(numbers) average = total / 4 print(&quot;Sum:&quot;, total, &quot;Average:&quot;, average)


Adding numbers from 0 to 5 in assembly language?

0000 0001 0010 0011 0100 0101


Why wont your c plus plus program stay open?

If you are talking about the program executing, but the output screen being displayed for a flash and then disappearing, I suggest adding getch() or getchar() function at the end of your main function. This will make sure that the output screen waits for you to press a character before the program terminates.


How data structure can influence program performance?

Greatly. Certainly, a person with data structures orientation will write better structure code. Imagine yourself is asked to write adding to big integers numbers having 200 digits? Using long also we can not do this. By employing linked list type data structure we can achieve this. This is an example only.

Related Questions

How is adding fractions like adding whole numbers?

adding fractions is like adding a WHOLE lot of parts of numbers


What is the rule in adding rational numbers?

what is the rule in adding rational numbers


How is adding mixed numbers different from adding fractions?

when you add mixed numbers you have a whole number but adding fraction does not.


What do you call the result of adding of to numbers?

The result of adding two numbers is their sum.


How is adding mixed numbers the same as adding fractions?

Mixed numbers can be converted to improper fractions. Then, it is exactly the same as adding proper ones.


What do you call the result adding two numbers?

Adding two or more numbers together gives you a sum.


What exactly is a Checkbook Balancer?

A checkbook balancer could be a person doing simple adding and subtracting of the numbers in their checkbook account. It is also a software program or a device.


What is the term used for adding 3 numbers together?

adding.


Which average is found by adding the numbers then dividing by how many there are?

The mean of a set of numbers is found by adding them together and dividing by how many numbers were added.


How is adding integers similar to adding whole numbers?

Integers include 0, the negative numbers without fractional parts, and the positive numbers without fractional parts. The "without fractional parts" part of the description implies that all of the integers are whole numbers. Therefore, if you are adding integers, you are adding whole numbers.


Unix program for adding of two numbers?

$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"


What is the symbol for adding two numbers together?

+ is the symbol for adding two numbers together.It is usually called the plus symbol.