775 Posted Topics
Re: use .equals when comparing Strings instead of == though I think it would have been more appropriate if the data type of choice is an int rather than a String | |
Re: There are lot's of exercises in the web if you search right try this it has an exercise included in every chapter [URL="http://www.javacoffeebreak.com/books/extracts/javanotesv3/index.html"]Introduction to Programming Using Java Version 3.0, Summer 2000[/URL] | |
Re: [QUOTE=rushikesh jadha;1726102]I Think Net Bean is great other than notepad it also allows you to compile,debug and run you code with few clicks.[/QUOTE] Don'y reply from a thread created in [COLOR="Red"]2003![/COLOR] | |
Re: use .equals() when comparing strings rather than == try to read this link for more info [URL="http://www.ensta-paristech.fr/~diam/java/online/notes-java/data/expressions/22compareobjects.html"]Java: ==,.equals()[/URL] | |
Re: [QUOTE]I have understood the logic behind this, but i am facing problem with the coding thing.. i am not able to get it properly..[/QUOTE] If the problem is in the code then post the code so we may help | |
Re: It would be a lot easier if the code is wrapped in code tags :( [QUOTE]return playAgian;[/QUOTE] If the function is a Boolean try to return either true or false | |
Re: Try to check / test first / (temporarily remove) each statement in the function to pinpoint which line causes the program to give a segmentation fault either that or post the complete program | |
Re: graphics.h was a library in the [COLOR="Red"]16[/COLOR] bit world where it is used for doing graphics in DOS with Borland C++ 3.x (In short it is an old & unsupported library nowadays ) ...maybe that's where your problem starts try using [URL="http://www.winprog.org/tutorial/"]Forger's[/URL] for making a window | |
Re: [QUOTE=Sherif1410;1724476]Thank you for your answer. I had read the international code in the previous two links. These do not solve the problem. I submit my JAVA code, so please if any one can update it and return the solution? That is exactly what I need. Thanks to all Sherif[/QUOTE] post … | |
Re: continue; causes a while or for loop to begin again at the top of the loop. Do you need to decrement the value of ctr to have another value? | |
Re: [QUOTE]scanf("%c",&ans);[/QUOTE] at line 27 use %s instead of %c | |
Re: [QUOTE]can you at least tell me if I should use a while or for loop? It can go either way[/QUOTE] Either loop will be fine as long as you use them correctly [QUOTE]for (int i = 0; i < grades.length;i++)[/QUOTE] I think you should use (count) as a counter to … | |
Re: [QUOTE=Ismatus3;1722405]Hello fanniecarnes , glad to communicate with you here :) , do you use Python ?[/QUOTE] You could check their profiles to know where they like to post | |
Re: try using [URL="http://www.cplusplus.com/reference/clibrary/cstdio/fscanf/"]fscanf[/URL] when reading a file, you can use google if your not familiar on using fscanf | |
Re: [QUOTE]exp.txt is created which is empty.[/QUOTE] Since "ch" has no value you don't write anything in the file | |
Re: If you don't pass on the first "if" statement then "p" will have no value making it uninitialized | |
Re: [CODE]for( int j = 0; j < 100; j++);[/CODE] in line 4 there should be no semicolon [COLOR="Red"];[/COLOR] there | |
Re: [QUOTE=songokute;1722763]Oh, firstly, im sorry if i did not write clearly coz i dont speak English! In your code, the largest number depends on the memory and the maximum number of int type! And about "exist", as i know, fibo sequence start with i = 0, so i think fibo(-1) = … | |
Re: > for ( int i=0;i<=size;i++){ > if(array[i]==array[i].length-1) > System.out.print("plindrom "); > else > System.out.print("not plindrom "); > try to check the values of array[i] and array[i].length-1 at the loop to know what your program is doing | |
Re: He's right the longer the code the harder it is to pinpoint the problem So for now I'll post a simple tutorial relating your problem [URL="http://javacooperation.gmxhome.de/PlatformGameBasicsEng.html"]platform tutorial [/URL] | |
Re: Are you still having problems on the collision? Maybe this tutorial ca help ya [URL="http://forum.codecall.net/java-tutorials/15969-double-buffering-movement-collision-detection.html"]collision tutorial[/URL] | |
Re: Maybe you should check if the next largest number being checked in the next loop is less than the current largest number | |
![]() | Re: [QUOTE]for(double x = Math.pow(b, 2)..[/QUOTE] that's because as it loops it keeps replacing the value of x from double x = Math.pow(b, 2) maybe remove it from the loop ;) you should have posted this in the java forum cause your problem is using a specific language(java) directly...maybe a mod … ![]() |
Re: Print out the values of the array containing the string using a loop the number of letters that would be shown would depend on the current value of the counter | |
![]() | Re: Since there's no limit in grades I suggest using a while loop instead of a for loop then stop the loop when a non-grade character is input |
Re: Next time wrap your code in code tags and properly indent it You should make an inner loop work according the number showing at the outer loop Pseudo: [CODE]for(int i=0;i<7;i++){ //outer loop if(i==0 || i==1){ //condition used to tell which loop to use for(int j=0;j<numberofstars;j++){ //inner loop used to print … | |
Re: could you post the whole error message | |
Re: [QUOTE=Hussam Alahmadi;1719958]in this assignment make the program read 10 integers and store them in an array. Then, pass this array to a method that finds the largest integer in the array, and counts its occurrences. Your method should return a string of the form largestNumber?????? > occurrenceCount. Then in the … | |
Re: The problem is in c, unlike java, has no support for a GUI You [I]could[/I] make your program work as c has a support for structures and linked lists but you'd have no choice but to remove the use of windows and buttons if your gonna convert it to c | |
Re: [QUOTE=CReza;1720641]I have to write persian (farsi) characters to a text file, but after writin when I open the file ,it's contents are unreadeable in persian and ther is some special characters pleaseeeeeeeeeeeeeeeeeeeeeeee help :-([/QUOTE] Don't hijack another person's thread start your own ![]() | |
Re: [CODE]gets(p[j]); //use scanf puts(p[j]); //use printf[/CODE] ![]() | |
Re: [CODE]#include<iostrem> //you mean #include<iostream> right?[/CODE] you forgot the [I]a[/I] | |
Re: try to trace the program on the loop containing k as the counter the value of check must be still equal to true cause after that loop you break the statement before that and then you break the statement before that...until you break the while loop | |
Re: [QUOTE=Riyasdeen;1720335]Kindly send the code. I need the code to transfer bulk of files from clinet to server. if you have the code means ,please share it with me. Thanks in advance[/QUOTE] 1.your hijacking a thread (start your own) 2.the thread your hijacking/reviving is from 2 years ago (necroposting) 3.we don't … | |
Re: For me I'd use a loop to store the character in an array | |
Re: [QUOTE=v3ga;1719475]Wrap code in code tags[/QUOTE] You know you could have also said to properly [URL="http://www.gidnetwork.com/b-38.html"]format[/URL] the code cause it's still hard to read | |
Re: Printout a welcome message Make a loop containing your question then ask if the user wants to continue then make the loop run while the user inputs yes otherwise the loop will stop ending the program We're willing to help you as long as your willing to help yourself post … | |
Re: Y and N have no values if you want to check if the user used either then compare it to the letter itself e.g. [CODE]if(query == 'Y')[/CODE] also [CODE]printf("That will be $%d, confirm? (Y/N)\n", price*numofbees);[/CODE] price is a float, &d is used for integers use %f | |
Re: [QUOTE=ben25x;1719345]Hello, I've been having a lot of trouble with a variable type called "float64". I'm trying to create a do{}while loop to make the number count up each time. data is also defined as an array. [CODE]float64 data[1]; int i; do{ for(i=0;i<1;i++) { data[i]=data[i]+.01; if(data[i]>9.99) data[i]=-9.99; } }while('0'=='0');[/CODE] Any guidance … | |
Re: [QUOTE]i have to make it with stars[/QUOTE] you could use loops that prints out asterisks | |
Re: [QUOTE=naz1234;1719287]hmm sory what do you mean by code that isn't formatted.?[/QUOTE] There's a link posted on WaitP's post Anyway check the Values of Acent to Fcent...did you notice that their output is 0 | |
Re: [CODE]double a;[/CODE] include this in the main function [CODE]printf("%.2lf\n", a);[/CODE] .(anynumber) represents the number of decimal places you want to output or just do the solution posted by WaitP to be exact | |
Re: post your code and make the instructions clear no one here's gonna do all the work for you | |
Re: Is it wrong to laugh while reading this? :D Anyway the kid does have a point and maybe he'll earn some extra bucks from the right people | |
Re: Is it showing a compiler error? post the errors Is it showing unwanted output? post the output Do you know how to properly format your code and wrap it it in code tags before you post? If yes then do so | |
Re: "If" he has no problem with the code he posted then the remaining problems he wants suggestions must be from numbers 10,8,7,6,5 ![]() | |
Re: Do you have prior knowledge of using graphics class in java? | |
Re: In lines 20,23,28,31 The correct conversion specifier for doubles is %lf when using scanf | |
Re: Make a constructor in the Product class that returns a String and a Double only |
The End.