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
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
write a program to display all prime numbers
Draw a flowchart to produce a printed list of all the students over the age of 20 in a class .The input records contains the name and age of students. Assume a sentinel value of 99 for the age field of the trailer record
What are variables and it what way is it different from constants?
What is indirection? How many levels of pointers can you have?
Is null always equal to 0(zero)?
What are the different categories of functions in c?
What is the correct code to have following output in c using nested for loop?
What are the three constants used in c?
Explain what are preprocessor directives?
Write a C program in Fibonacci series.
Explain the ternary tree?
What is c system32 taskhostw exe?
How do you define structure?
How was c created?