plz answer.... write a program that reads line (using
getline) e.g."345", converts each line to an integer
using "atoi" and computes the average of all the numbers
read. also compute the standard deviation.
Answer Posted / dally
#include<stdio.h
int main()
{
char array[]= "345";
int n;
n = atoi(array);
while(n>1)
{
int sum,aveg,no=1;
n = n%10;
no++;
sum = sum+n;
n=n/10;
}
aveg= sum/no;
printf("Aveg of number %d\n",aveg);
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What is array in C
Explain about C function prototype?
Tell me what are bitwise shift operators?
How does sizeof know array size?
How can I send mail from within a c program?
What is meant by type casting?
What is 1d array in c?
Why is not a pointer null after calling free? How unsafe is it to use (assign, compare) a pointer value after it is been freed?
What is the difference between array and structure in c?
What do you mean by dynamic memory allocation in c?
Can include files be nested? How many levels deep can include files be nested?
Explain what is the most efficient way to store flag values?
What is the usage of the pointer in c?
What is d'n in c?
void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply