Wiki User
∙ 12y agoSample 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));
}
Wiki User
∙ 11y agoWiki User
∙ 8y agoimport 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+"%");
}}
Wiki User
∙ 8y agoFirst 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.
Wiki User
∙ 12y agowap tocalculate avarage and percentage marks of a student c++
Wiki User
∙ 12y agowrite a program accepts the marks of three subjects and find the total using suitable function.
Wiki User
∙ 12y ago19028
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
You might be thinking of a "keyboard logger".
Impossible to say without seeing the program's source.
An input stream is a character sequence device or buffer from which input can be gathered. The standard input stream is usually a keyboard, data file or the output stream from another program. The user of the program can normally decide where standard input may be redirected from when launching the program, typically defaulting to the keyboard.
#include<stdio.h> #include<conio.h> int main () { int num; printf("enter the number"); scanf("%d",&num); if(num<0) num=(-1)*num; printf("absolute value=%d",num); getch(); return 0; }
"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.
"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.
c is programming laungage
nine seven two
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.
printf ("%g\n", (n+1.0)/2);
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.
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
Use 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.
Try "enter". (It depends on the program.)
Every character in C++ is basically belongs to short. You can convert entered characters to short, compare their values and according to the values sort them in alphabetical order.