answersLogoWhite

0

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

12y ago

What else can I help you with?

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.


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 c program to calculate product of all even numbers from entered number down to 1?

c is programming laungage


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


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.


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


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.