answersLogoWhite

0


Best Answer

Sample code is as follows:

#include <stdio.h>

void main()

{

int i = 0;

int final_number = 0;

int array[] = {1,2,3,4,5};

for(i = 0; i < (sizeof(array)/sizeof(array[0])); i++)

{

final_number += array[i];

}

printf("Sum = %d and average = %d", final_number, (final_number / i));

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

import java.util.Scanner;

public class Answer

{

public static void main(String[] args)

{

Scanner inp = new Scanner(System.in);

double sum = 0;

for(int i = 1; i<= 5;i++)

{

System.out.print("Enter Marks#"+i+": ");

sum = sum + inp.nextInt();

}

sum = sum / 5.0;

System.out.println("Percentage: "+sum+"%");

}}

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

First you must understand the problem - it isn't quite clear to me, percentage compared to what? When using percentages, you are usually comparing different numbers. Once you decide that, you just divide the numbers you want to compare (to express as a percentage), and multiply by 100, to express it as a percentage.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

wap tocalculate avarage and percentage marks of a student c++

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

write a program accepts the marks of three subjects and find the total using suitable function.

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

19028

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to Calculate the average of five entered number from keyboard?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is key entry?

"keyboard entry" refers to: 1. data entered into a computer by a person typing on a keyboard. 2. information received by a computer from a keyboard. This might refer to the data coming into a computer program for example.


What is key board entry?

"keyboard entry" refers to: 1. data entered into a computer by a person typing on a keyboard. 2. information received by a computer from a keyboard. This might refer to the data coming into a computer program for example.


What is c program to calculate product of all even numbers from entered number down to 1?

c is programming laungage


Writa a program to print a number in word eg if 972 is entered through the keyboard that should print nine seven two?

nine seven two


What is most commonly used to enter text into a word processing program?

Text is normally entered using a keyboard. It can be brought in from other sources and imported into a word processor. It could be copied from another application.


What is the program to calculate the average of first 'n' natural numbers?

printf ("%g\n", (n+1.0)/2);


The distance between two cities in km is input through the keyboard write a program to convert and print this distance in meters feet inches and centimeters?

mesh's basic salary is input through the keyboard. his dearness allowance is 40% of basic salarying , and house rent allowance is 20% of basic salaried. write a program to calculate his gross salary


How do you use the word cursor in a sentence?

A flashing, letter-sized portion of a computer screen operating a word processing program often indicates the position of the cursor, where new letters from a keyboard may be entered into the display on the screen.


How you write a c program in notepad?

Use the keyboard.


What is the purpose of the keyboard?

The purpose of a keyboard in relation to a computer is to provide input. It is for using program applications and operating system commands.


Where is the action button on your keyboard?

Try "enter". (It depends on the program.)


Can you make a Pi sign on a keyboard?

No, this sign is not found on a keyboard. However you can find &pi; (pi) on the Character Map program.