char x,y,z;
x=100;
y=200;
z=x+y; /* overflow */
x=100;
y=100;
z=x+y; /* overflow if signed, okay if unsigned */
x=100;
y=20;
z=x+y; /* okay */
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
Da program pa yakho obo olambawa
#include<iostream.h> #include<conio.h> void main() { int a, b, c; clrscr(); cout<<"enter the two numbers"; cin>>a; cin>b; c=a+b; cout<<"Addition of two numbers="<<c; getch(); }
#include int main(void){int a;for(a=100;a
You can make use of pointers to achieve this.void add( int *a, int *b){(*a) += (*b);}Now if two numbers a and b are given and you need to store the value in variable c, then you would perform:c = a;add(&c,&b);
write it in 8085
int main() { int num1; int num2; int result = num1 + num2; return 0; }
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
Mov a.#000ff, mov b,#0008f add a,b
Add the numbers into one variable as you read them in. But if you prefer, you can read the numbers into an array and then use a loop to add the numbers together.
yes ,i can add the website link in java program when we write.
A+(B+C**3) (A-(+D+B/A+B)
Write a program using the ADI instruction to add the two hexadecimal numbers 3AH and 48H and store the result in memory location 2100H
1. Write the program 2. Compile and link it 3. Execute it by entering its name at command prompt
USING STRING LITERAL VALUES TO ADD 2 NUMBERS If you just want to show the outcome of two numbers you have: PRINT 4 + 5 This will print '9' the answer to 4 + 5. If you want to show the addition: PRINT "4 + 5 = "; 4 + 5 This will show the question and then calculate the answer. If you want the user to input numbers to add, use variables and then add them the same way. ====== COLLECTING USER INPUT FROM THE KEYBOARD/USING NUMERIC VARIABLES In the following example, the end user can get to interact with the program by typing in their numbers at the keyboard; then, pressing the [Enter] key. CLS PRINT "PROGRAM: Add 2 numbers" PRINT INPUT "Enter the 1st number: ", number1 INPUT "Enter the 2nd number: ", number2 PRINT sumTotal=number1+number2 PRINT "The sum total is: "; sumTotal PRINT INPUT "Again, Y/N"; yesNo$ IF UCASE$(LEFT$(yesNo$,1))="Y" THEN RUN END ====== CREATE FUNCTION/THEN, MAKE A FUNCTION CALL TO ADD 2 NUMBERS Another way to write this program is to create a function/then, make a function call... '*** PROGRAM: Add 2 numbers... '*** Variable declaration list... number1=7 '...initialise numeric variable 1 number2=3 '...initialise numeric variable 2 '*** Main program... CLS '...(CL)ear the (S)creen PRINT add(number1,number2) '...make function call/passing in 2 numbers to add END '...END of program/halt program code execution '*** Function(s)... FUNCTION add(num1,num2) '...this line marks the start of the Function add=num1+num2 '...this line returns the sum total of the 2 numbers END FUNCTION '...this line marks the end of the Function
Da program pa yakho obo olambawa
GOUDHMARINI