hi all i need ur help to solve this problem

1. write an algorithm to find the average of there number called a,b,c

2. write an algorithm to add up all odd numbers between 0 and 100

3. what data type for
(i) True ]

if data type for 123 is Int


thanks

hi all i need ur help to solve this problem

1. write an algorithm to find the average of there number called a,b,c

2. write an algorithm to add up all odd numbers between 0 and 100

3. what data type for
(i) True ]

if data type for 123 is Int


thanks

Put some effort into it. No one's going to write code for you. If you're stuck on how to begin, figure out in detail what your code needs to do.

Tips:
1) What do you do when you average? If there are three numbers, you add them up and then divide by three. What, therefore, does your code need to do?

2) If a given number x is odd, then using modulus, x%2 = 1. How can your code use this means of IDing odd numbers to analyze numbers between 1 and 100?

3) A variable which is either true or false is known as a boolean.

Hi Ganesh5155,

I am sorry to say that u should not give question of your assignment without giving your answer of your assignment. This shows that you have not done your research and hope for the public answers. If you shows your answers to the public and we can help you by correcting your mistakes and discussion of your topic starts automatically. "Your answers shows your efford". This is some nice advise from me to you.:) So for this time I will help you and I hope next time you will show your effort.

Hi All,:)

After many research and referance that I have done I got the answer of Ganesh5155 questions but I am not sure weather my algorithm is right or not because I am in the process of learning Java. So I hope I could get some positive feedback,response and advise from all of you.:icon_smile:

Question (a):-/

Input Num 1=a //read a as an int a
Input Num 2=b //read b as an int b
Input Num 3=c //read c as an int c
Begin
Count average=(a+b+c)/3
End
Print "Count average"

Question (b):icon_frown:

Input Num 1=x // read x as 0<=100
Input Num 2=y//read y as odd numbers
Begin
y=x%2=1 //modulus by 2 gets 1
Total y=y+x //total up all the odd numbers
Total x=x+1//increase the x value
End
Print "Total y"


Thanks:)

commented: spoon-feeder award of the week award -7

Hi All,:)

After many research and referance that I have done I got the answer of Ganesh5155 questions but I am not sure weather my algorithm is right or not because I am in the process of learning Java. So I hope I could get some positive feedback,response and advise from all of you.:icon_smile:

Question (a):-/

Input Num 1=a //read a as an int a
Input Num 2=b //read b as an int b
Input Num 3=c //read c as an int c
Begin
Count average=(a+b+c)/3
End
Print "Count average"

Question (b):icon_frown:

Input Num 1=x // read x as 0<=100
Input Num 2=y//read y as odd numbers
Begin
y=x%2=1 //modulus by 2 gets 1
Total y=y+x //total up all the odd numbers
Total x=x+1//increase the x value
End
Print "Total y"


Thanks:)

What kind of research you had to do ? I thought these are trivial homeworks

Not sure what sort of research you playing at.
Ganesh5155 posted his requirements in hope that somebody will take pity on him and do his homework. Since hist first and also last post he did not care to comment on anything and not even tried to solve issue. Either he got answer on some other forum, or he sweet-talked some other student to show him solution or he did not submit and failed.
Personally I couldn't care less.If you do not show interest, why shall I help you at all...

Hi All,:)

After many research and referance that I have done I got the answer of Ganesh5155 questions but I am not sure weather my algorithm is right or not because I am in the process of learning Java. So I hope I could get some positive feedback,response and advise from all of you.:icon_smile:

Question (a):-/

Input Num 1=a //read a as an int a
Input Num 2=b //read b as an int b
Input Num 3=c //read c as an int c
Begin
Count average=(a+b+c)/3
End
Print "Count average"

Question (b):icon_frown:

Input Num 1=x // read x as 0<=100
Input Num 2=y//read y as odd numbers
Begin
y=x%2=1 //modulus by 2 gets 1
Total y=y+x //total up all the odd numbers
Total x=x+1//increase the x value
End
Print "Total y"


Thanks:)

hi all......
thanks for ur reply......
n special thanks to gpremkum.....
gpremkum ur answer is correct.....

commented: Good for you, now figure out WHY it's correct otherwise next week's homework will be impossible - your path to failiure awaits you. -7
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.