Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~2K People Reached
Favorite Forums
Favorite Tags
java x 12
c x 12
Member Avatar for PeterX

Hi! I want to learn C language. my question is: how dose this while loop wok. [code] while((c=getChar()) !=EOF) if(c>'0' && c<'9') nbr++; [/code] How EOF(end of file ) works? EOF=-1; How can I stop the program? when I write (-1) I can not stop the program.

Member Avatar for N1GHTS
0
253
Member Avatar for PeterX

I have a litle problem please help me whit: I want to write a methode whit one paramter. public int studentInformation(int hour){//How long time(hour) he was at school. - - - - - - --- - - - - - - - - - - - - - - - …

Member Avatar for swapnil_gadkari
0
93
Member Avatar for PeterX

My program prints out Fibonacci_number(0,1,1,2,3,5). The program is ok. My problem:I want to take a number from Fibonacci_number(0,1,1,2,3,5) and multiply whit 10. ex: I want to take 3 and multiply with 10. I tried to write another function and call a Fibonacci_number from fib(int k)and then multiply it whit 10. …

Member Avatar for Dave Sinkula
0
173
Member Avatar for PeterX

[code] #include<stdio.h> int main(){ double price=500; double year=5; double total; if(price==500) { //???????????????????? scanf("%f", &price); printf("%f\n", price); } total=(price * year); printf("%f\n", total); } [/code] why the scanf() can not get a new value from keyboard. I want to give a new value to the price but the out put …

Member Avatar for Ancient Dragon
0
88
Member Avatar for PeterX

Hi! I have problem with type conversion. when I compile the program I get this error: ( 'count' : redefinition; different basic types ). please tell me about type conversion. [Code] #include<stdio.h> int count(double houre, double charge); int main(){ double h=4; double c=2; printf("%d\n", count(h,c)); return 0; } int count(double …

Member Avatar for PeterX
0
98
Member Avatar for PeterX

Hi! I want to learn C programming. I have problem whit print out. if I have: [code] double value_1; int value_2; // how do I print out double ....? printf(?????) [/code] if I have [code] int A=5; double B=10.5; result=(double) A/B // the result type is double but how do …

Member Avatar for Dave Sinkula
0
117
Member Avatar for PeterX

Hi! [code] for (year = 1; year <= 15; year++) { cost = (interest_cost + monthly_instalment); totalCost+=cost; //after how many years the totalCost > price if(totalCost>price) printf(" %d ", year); } [/code] question:after how many years the totalCost > price? my problem: if the price is equal to 10 $ …

Member Avatar for Drowzee
0
319
Member Avatar for PeterX

Please help me! My program does not work 1-I have problem wihte constructors parameters 2-I have problem whit toString methode. User writes(from keyboard): workers name, hourPayment, and time(how many hours he has worked, first week, second week....). The out put is like this: his(name) salary is.....$ for first week his(name) …

Member Avatar for jerbo
0
67
Member Avatar for PeterX

Hi! I have a little problem The program is OK, but I can not print out: QUESTION is how can I print out (class Test). I mean How can I write toString()methode.how can I print out "myTable" and the out put must be like this: Audi blue 180 Volvo red …

Member Avatar for PeterX
0
99
Member Avatar for PeterX

Hi! How can we print out boolean???? I mean when the method returns false or true. ex: public boolean test(int a, int b) return true return false thanks peter

Member Avatar for Narue
0
52
Member Avatar for PeterX

Hi! 1. My metod has 4 int parameter, and return true if least one of those parameter can be dividable with 5. otherwise return false. 2. if least two or three of those parameter can be dividable with 5. Code: class Test{ public static void main(String[]args){ NumberTest myNbr=new NumberTest(); int …

Member Avatar for nanosani
0
80
Member Avatar for PeterX

Hi! I can not solve this JAVA problem. I tried to write: final int a=100; int nbr=Input.readInt();// from keyboard I try to find (nbr*nbr)>a ex: nbr=11 and 11*11=121 12*12=144 10*10=100 Output must be 121, not 144 but 144 is also >100 thanks Peter

Member Avatar for nanosani
0
220
Member Avatar for Maverick

ok the error is that it doesnt recognize the package class. [code] package celsiustofahrenheit; public class CelsiusToFahrenheit { public static void main(String args []) { double celsius, fahrenheit = 0; System.out.println("\n\tEnter temperature in celsius: "); celsius = MyInput.readDouble(); fahrenheit = 1.8 * celsius + 32; system.out.println("\n\tThat is " + fahrenheit …

Member Avatar for PeterX
0
171