#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
(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
C#.net ProgramsProgram # 1:This program takes three positive numbers from user. Compute and display the average of the two larger numbers. using System;using System.Collections.Generic;using System.Text;namespace Average_of_three_Nos{class Program{static void Main(string[] args){string no1, no2, no3;int n1, n2, n3;int average;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);Console.WriteLine("Enter third Number");no3 = Console.ReadLine();n3 = Int32.Parse(no3);average = (n1 + n2 + n3) / 3;Console.WriteLine("Average of three Numbers : "+ average);}}}Program #2:This program will take two positive numbers as its input and then find GCD of them.using System;using System.Collections.Generic;using System.Text;namespace GCD{class Program{static void Main(string[] args){Program obj = new Program();string no1, no2;int n1, n2;Console.WriteLine("Enter First Number");no1 = Console.ReadLine();n1 = Int32.Parse(no1);Console.WriteLine("Enter Second Number");no2 = Console.ReadLine();n2 = Int32.Parse(no2);int g=obj.find_gcd(n1, n2);Console.WriteLine("GCD=" + g);}int find_gcd(int a, int b){int c;if(a
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
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
3000
3,000,000,000,000
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.
303.02
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.
The correct way to write it in numbers is: 5,008,023.