public int[] makePi() { return new int[] {3,1,4}; }
public int[] makePi() { int pi[] = {3,1,4}; return pi;}
it is wrong because of return type is integer
I believe we need to make the pi from 22/7 and catch the first three number in the array. Please correct me.
Math.PI will give the Pi value and we have to extract first 3 digits from there
If you like our content, feel free to follow me to stay updated.
Enter your email address:
We hate spam as much as you do.
Upload
public int[] makePi() {
ReplyDeleteint pi[] = {3,1,4};
return pi;
}
it is wrong because of return type is integer
DeleteI believe we need to make the pi from 22/7 and catch the first three number in the array. Please correct me.
ReplyDeleteMath.PI will give the Pi value and we have to extract first 3 digits from there
ReplyDelete