Cls
input "enter two no.s ",a,b
sum=a+b
print "sum = ";sum
end
write a simple but a complete Qbasic that will accept three numbers find sum and the average of these numbers. write a simple but a complete Qbasic that will accept three numbers find sum and the average of these numbers. write a simple but a complete Qbasic that will accept three numbers find sum and the average of these numbers.
CODE CREATED: 26th January 2009 - 22:59 PM GMT
CLS '(CL)ear the (S)creen
PRINT "Maths PROGRAM: Calculates both sum total/and, average of 3 numbers"
PRINT "You will berequired to enter 3 numbers, seperately; one at a time;"
PRINT "then, the progam willfind the 3numberssum total/and, also, average."
INPUT "Enter number 1"; number1%
INPUT "Enter number 2"; number2%
INPUT "Enter number 3"; number3%
total% = number1% + number2% + number3%
average% =total%/3
PRINT "The total of your 3 numbers is: "; total%
PRINT "The average of your three numbers is: ";average%
END '...END of program/halt program code execution
I'm not too sure that I understand exactly what you mean by 'add a square'...?! Thus, I will attempt to answer the question using multiple different ways; hoping that, least, 'one' of these answers might be right... ==> CLS PRINT "PROGRAM: Twelve Times Tables Number Square" PRINT FOR intTimes% = 1 TO 12 FOR intTables% = 1 TO 12 sum% = intTimes% * intTables% noOfSpaces% = 0 IF LEN(STR$(sum%)) = 2 THEN noOfSpaces% = 2 IF LEN(STR$(sum%)) = 3 THEN noOfSpaces% = 1 PRINT sum%; SPC(noOfSpaces%); NEXT PRINT NEXT END <== ...QBASIC Code/End.
"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
write it in 8085
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.
8
CLS FOR eachNum%=1 TO 10 STEP 2 PRINT eachNum% NEXT
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
-- Think of a name for the sum, like 'S'.-- Tell qbasic what 'S' is the sum of.S = 41 + 61 + 2 + 84 + 136-- If you want to see it on the screen, thenPRINT Sand the sum pops up. It looks like this on the screen:324
1. Write the program 2. Compile and link it 3. Execute it by entering its name at command prompt
I'm not too sure that I understand exactly what you mean by 'add a square'...?! Thus, I will attempt to answer the question using multiple different ways; hoping that, least, 'one' of these answers might be right... ==> CLS PRINT "PROGRAM: Twelve Times Tables Number Square" PRINT FOR intTimes% = 1 TO 12 FOR intTables% = 1 TO 12 sum% = intTimes% * intTables% noOfSpaces% = 0 IF LEN(STR$(sum%)) = 2 THEN noOfSpaces% = 2 IF LEN(STR$(sum%)) = 3 THEN noOfSpaces% = 1 PRINT sum%; SPC(noOfSpaces%); NEXT PRINT NEXT END <== ...QBASIC Code/End.
int main() { int num1; int num2; int result = num1 + num2; return 0; }