answersLogoWhite

0

#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();

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


Write a Program in lisp to find maximum of three numbers?

(defun max3 (a b c) (cond ((&gt; a b) (cond ((&gt; a c) a) (t c))) ((&gt; b c) b) (t c) ) )


How do you write a Turbo C plus plus program that reads sides of triangle?

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 algorithm and draw a flow chart to find the total and average of a student for six subjects?

write an algorithm to compute the weekly average rainfall given the daily rainfall for four weeks


C sharp dot net example programs for beginers?

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

Related Questions

Shell program for 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? 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


Write the program in qbasic and add two numbers?

Cls input "enter two no.s ",a,b sum=a+b print "sum = ";sum end


Write a 'c' program to fine a largest of three numbers?

largest of a, b, c :a > b ? a > c ? a : c : b > c ? b : c


What is the average of 5000 and 7000?

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


How do you write three thousand in numbers?

3000


How do you write three trillion in numbers?

3,000,000,000,000


What are the three numbers if the average of three consecutive numbers is 126?

125, 126 and 127.


Could an average of three numbers be one of those three numbers?

Yes. For example, the average of 5, 7, and 9 is 7.


What are three prime numbers where the average is a prime number?

3, 5, and 7 are three prime numbers whose average is 5.


How do write three hundred three and two hundredths in numbers?

303.02


What is the average of 51 52 on 56?

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.


How can you write five million eight thousand and twenty three in numbers?

The correct way to write it in numbers is: 5,008,023.