#incude<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int a,b,c,d,avg;
cout<<"enter s numbers";
cin>>a>>b>>c>>d;
d=a+b;
avg=d\3;
cout<<"the average is"<<s;
getch();
}
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
To write a program that accepts 5 integers in an array and calculates the average of the first three, you can follow these steps: First, create an array to hold the 5 integers. Then, prompt the user to input the integers and store them in the array. Finally, compute the average of the first three integers by summing them and dividing by 3, and display the result. Here’s a simple example in Python: numbers = [int(input("Enter integer {}: ".format(i + 1))) for i in range(5)] average = sum(numbers[:3]) / 3 print("Average of the first three integers:", average)
(defun max3 (a b c) (cond ((> a b) (cond ((> a c) a) (t c))) ((> b c) b) (t c) ) )
You write it exactly the same as you would write it in any other verions of C++, by taking user input to determine the three sides of your triangle. In other words, input three real numbers. What you do with those three numbers is entirely up to you, but presumably you'd want to calculate the angles of a triangle given the length of its three sides. For that you would need to use the cosine rule which states that for any triangle with angles A, B and C whose opposing sides are a, b and c respectively, cos A = (b2 + c2 - a2)/2bc and cos B = (c2 + a2 - b2)/2ca. Knowing two angles, A and B, you can easily work out that angle C must be 180 - (A + B).
write an algorithm to compute the weekly average rainfall given the daily rainfall for four weeks
write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html
Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end
To write a program that accepts 5 integers in an array and calculates the average of the first three, you can follow these steps: First, create an array to hold the 5 integers. Then, prompt the user to input the integers and store them in the array. Finally, compute the average of the first three integers by summing them and dividing by 3, and display the result. Here’s a simple example in Python: numbers = [int(input("Enter integer {}: ".format(i + 1))) for i in range(5)] average = sum(numbers[:3]) / 3 print("Average of the first three integers:", average)
To compute the average of three numbers, first, sum the three numbers together. Then, divide the total by 3. The formula can be expressed as: Average = (num1 + num2 + num3) / 3. This will give you the average value of the three numbers.
largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c
To calculate the average of two numbers, add them together, and divide the result by 2. (For the average of three numbers, you add up the three numbers, and divide by three, etc.) The average is (5000 + 7000)/2 = 6000
3,000,000,000,000
3000
125, 126 and 127.
Yes. For example, the average of 5, 7, and 9 is 7.
3, 5, and 7 are three prime numbers whose average is 5.
The average of the numbers 51, 52, and 56 is 53. To get the average you would add all three numbers and then divide by three.