ans????

find average of list of numbers entereed through keyboard???????
Did you try doing it you're self first? Show some of you're work
Done and done. In fact I've found several ways of doing it, and as I type this I am working out how to do it in several other languages. Now what?

EDIT: We would like you to try the code, post what you have so far even if it is just the part that takes the input from the user. From here we will gladley help you. Don't be afraid of trolls, I'm about as bad as we get here ;).
Last edited on
#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,sum,n;
cout<<"enter any numbers";
cin>>n;
for(i=1,sum=0;i<=n;++i)
{
cout<<"\n"<<i;
sum=sum+i;
}
cout<<"\n"<<""the sum of first"<<n<<"natura numbers is"<<sum;
getch();
}
plz tell how can i find its average???????
You find the average by taking the numbers you want to find the average of, adding them together, and then dividing that total by the number of numbers that you had.
but in which line apply avreage fourmula ?????? and how???????
You are going to have to write some new code yourself.
thnx man
Anytime. This isn't really the kind of forum where people will do your homework for you. Try Codeguru.com
plz can u tell me how i cheak squre root is prime or not ???
Assuming your square root is a positive integer, try dividing it by every positive integer lower than itself, except one. If any of them divide exactly, it's not prime.
Last edited on
have any hint about convert digit into words??????????

Sure. Here's a code chunk.

1
2
3
4
5
switch(i){
case 1:
  cout<<"One";
  break;
}
thnx!!!!
Topic archived. No new replies allowed.