775 Posted Topics

Member Avatar for 03hasnam
Member Avatar for stultuske
0
292
Member Avatar for gourav1
Member Avatar for tiredoy

The code you posted is in c++ format and not in standard c format now for assigning... [QUOTE]if (*k==1) *k==0; else *k==0;[/QUOTE] == is used to check if the values are equal = is used to assign a value to a variable

Member Avatar for WaltP
0
129
Member Avatar for cluelessx
Member Avatar for stultuske
0
195
Member Avatar for rizal189

> how to sorting this, i've problem to sort by *jum_nilai* from the highest until smallest void lihatData(void) { if(pertama==NULL) printf("Data tidak ada !!!"); else { printf("%3s %-20s %-12s %-5s %-7s %-7s %-5s %-5sn","No","Nama","Jenis K","N Mtk","N B.Ind","N B.Ing","N IPA","Jumlah"); printf("--- -------------------- -------------- ------- ------- ------- ----- -----n"); sekarang=pertama; do { …

Member Avatar for zeroliken
0
70
Member Avatar for hanisakura92

We can only help you if you help yourself post your code if you have problems with them

Member Avatar for zeroliken
0
178
Member Avatar for queenz68

[QUOTE]The second thing I'm trying to do is have it total the numbers in the array, which are basically {99, 88, 77, 66, 55, 44, 33, 22, 11, 0},[/QUOTE] use a loop that will add the value of the current array index

Member Avatar for queenz68
0
99
Member Avatar for ces06546

if(moreseats == 88) { System.out.println("You entered 88, no more seats."); } just using a println will not stop operations that should come after it try using a loop then use a break when 88 is entered the problem with the arrays lies within the loops try to trace your code …

Member Avatar for zeroliken
0
1K
Member Avatar for JerryRong

[CODE]for ( int = 10; i > 0; i--)[/CODE] missing[COLOR="Red"] i[/COLOR] in the declaration [QUOTE]Guys I don't know the output of the following loop please help me out[/QUOTE] I think you should study how loops work before asking questions like these.. the codes you posted are very basic it should …

Member Avatar for mrjillberth
0
133
Member Avatar for gourav1

There are tons of exercises on the web if you just search right.. try google search

Member Avatar for v3ga
0
90
Member Avatar for AAChaoshand

If the price is fixed you could have just initialized it already e.g. [CODE]private double coffee = 1.00;[/CODE] Now I don't see a method name for the following.. Is this supposed to print the output [CODE]{ System.out.println("Item Name Price"); System.out.println("Coffee $1.00"); System.out.println("Water $2.00"); System.out.println("Milk $1.50"); System.out.println("Bagel $1.25"); System.out.println("Donut $0.75"); }[/CODE] …

Member Avatar for zeroliken
0
127
Member Avatar for WARburg

[QUOTE=pteryx;1715369]The advice by Warburg is a valuable hint, but the WIN32 API funcion ReadConsoleInput waits for a keypress or a mouseclick. It must be supplemented with a wait function. The following function returns zero when nothing was pressed and ASCII code when something "ASCII" was pressed. I hope that this …

Member Avatar for zeroliken
0
3K
Member Avatar for venkat4krish

[QUOTE]So in order to understand the source code !! from where should i start ????[/QUOTE] it depends on the code and the programming language used

Member Avatar for zeroliken
0
235
Member Avatar for Techwriter10

I completely agree that the boot time windows gets for every version gets worst I just hope that it becomes better for windows 8 regardless of the hardware

Member Avatar for pacav69
0
469
Member Avatar for twinkle2011

read here for more info [URL="http://java.sun.com/products/jfc/tsc/articles/timer/"]timer classes[/URL]

Member Avatar for hfx642
0
541
Member Avatar for Jah-Jah

First, We don't code for you... we can only help provided you give your code that you need help with Second, if just your just asking for suggestions then you can use arrays and an if statement to compare the letters to their corresponding number..then do the operations required to …

Member Avatar for hfx642
0
77
Member Avatar for willleung9

[QUOTE=willleung9;1714441]Can someone please help me?!?![/QUOTE] In what way can we help you Is there an error? I notice in your code that you don't have a constructor function in the code you posted above

Member Avatar for thines01
0
6K
Member Avatar for MylesDBaker

[QUOTE]3. The else condition is never reached. [/QUOTE] the reason the else statement is never reached is because all the possible outcomes can already be found in the if and if else statement

Member Avatar for MylesDBaker
0
142
Member Avatar for rotten69

[QUOTE]for( c=0; c <= b; b++){ println("b = " + b);[/QUOTE] Since nothing happens to c it will never be equal to b which is why it loops forever [QUOTE]if(b ==5){ println("loop terminated " + c++); }[/QUOTE] Also since b = 6 it will never be equal to 5

Member Avatar for rotten69
0
184
Member Avatar for JerryRong

So.... is there a specific error you want to tell? are you asking us for suggestions or instructions? Are you unsure of what to do next? or maybe the code doesn't give the correct output? please specify

Member Avatar for stultuske
0
310
Member Avatar for The 42nd

[QUOTE=The 42nd;1714407]First of all, I don't even know what do you mean by "format the code properly". I used tabs, enters and spaces as much as I can see. What is so improper about it? I could have answered if you had asked a question about the code which is …

Member Avatar for zeroliken
0
133
Member Avatar for J.S.AlKatheeeri

[QUOTE=J.S.AlKatheeeri;1713964]nope, no one explained this to me before...[/QUOTE] Isn't it your duty to learn or know something like that?

Member Avatar for jwenting
0
142
Member Avatar for theUserMan

[QUOTE=davidname;1713955]is there any simple code for geometric mean...?[/QUOTE] your replying to an old thread...start your own

Member Avatar for zeroliken
0
494
Member Avatar for lgbagabuyo

[QUOTE]can you post your code in [ Code ] tags without the extra lines and symbols in? [/QUOTE] Do we have to repeat?

Member Avatar for zeroliken
0
268
Member Avatar for SketchGamer

[QUOTE=SketchGamer;1713540]My question was HOW to search through an array... I wanted you to tell me so I could apply that knowledge in my game.[/QUOTE] simple... just use a loop pseudo: [CODE]for(int i=0;i<array.length();i++){ if(array[i]==11){ //do something } }[/CODE]

Member Avatar for zeroliken
0
1K
Member Avatar for i_ignore08

then try to find the specific part of the code that gives the unwanted result maybe print each array index one by one

Member Avatar for bibiki
0
137
Member Avatar for JerryRong
Member Avatar for DiabloInC
Member Avatar for gourav1

What's this?.. another [B]guess what's wrong with my code[/B] game... huh Not only do you want us to do the work for you, but you did not state how your program works, it's purpose or the desired output.

Member Avatar for mikrosfoititis
0
254
Member Avatar for JavaPrograms
Member Avatar for zeroliken
0
4K
Member Avatar for ZedChu

[QUOTE]I hope you understand me. Otherwise I will try to make it clearer. Thanks[/QUOTE] What you forgot to mention is in what way should we help you

Member Avatar for zeroliken
0
92
Member Avatar for chriswinter

to show the user the conversion... Is there a reason for it not to be in the print line?

Member Avatar for NormR1
0
298
Member Avatar for javabeg123

You don't have a process where you save a new value for maxlength in your case maxlength should have a value equal to the current city name that has the most uppercase letters Since the last city name has a length greater than [B][COLOR="red"]0[/COLOR][/B] it will output the last city …

Member Avatar for stultuske
0
233
Member Avatar for pintuoo

help you in what? is there a specific error you want to tell? are you asking us for suggestions or instructions? Are you unsure of what to do next? or maybe the code doesn't give the correct output? please specify

Member Avatar for sharathg.satya
0
100
Member Avatar for c fan

you can use edit or delete operations on either the .bin file or .txt file as these only depend on your code Since your teacher told you to use a binary file then your free to use a .bin file if it's a requirement It doesn't really matter which you …

Member Avatar for Ancient Dragon
0
241
Member Avatar for ali11

So whats the problem with the bounces can you specify your desired output? also you should have used your previous thread instead of creating a new one

Member Avatar for zeroliken
0
274
Member Avatar for chriswinter

[QUOTE]I need to print out the scores and the grades when entered and i do not know how to print the scanner. im sure i am probably missing other things as well.[/QUOTE] print the scanner?? or print the variables you used scanner at?? please make it more clear also [CODE]System.out.printf("%s%d%s\n", …

Member Avatar for chriswinter
0
131
Member Avatar for mridul.ahuja

[QUOTE]Do not ask for code. We are not a coding service. We will help you fix your code. If anyone posts a complete working solution for you, they are enabling cheaters. If you use that code you are a cheater. [/QUOTE] [URL="http://www.daniweb.com/software-development/c/threads/78060"]Read me[/URL]

Member Avatar for mridul.ahuja
0
4K
Member Avatar for lastbencher

If you want to print out the exact number of decimal places then manipulate a decimal number between %f [CODE]printf ("%.1f",a); //will print out a with 1 decimal digit[/CODE]

Member Avatar for mridul.ahuja
0
147
Member Avatar for Nekawa

[QUOTE]atoi1[0] = rev1[len1]; atoi2[0] = rev2[len2]; atoi1[1] = '\0'; atoi2[1] = '\0'; num1 = atoi(atoi1); num2 = atoi(atoi2);[/QUOTE] what are you trying to achieve here? atoi just converts a string to an integer why put a null terminator at the end? [CODE] int i; char Input [512]; printf ("Enter a …

Member Avatar for Nekawa
0
2K
Member Avatar for Liuhh00

Yes its possible to have a case within a case. Did you compile your work cause I can see a lot of syntax error [QUOTE] scanf("%c", &option);[/QUOTE] In lines 11,50,84,124,157,190,231,298,342,383 Use %s in receiving input [QUOTE]printf("Do you want to find the volume or surface area of the sphere?Indicate by entering …

Member Avatar for Liuhh00
0
1K
Member Avatar for mr_maverix

your going to use 2 dimensional arrays Don't expect someone here to give you the immediate answer try coding your work and we'll help you if you have any problems

Member Avatar for mridul.ahuja
-1
306
Member Avatar for persianprez

[QUOTE]well yes, I know that. I was rather looking for someone to give me an example of how I could do this. [/QUOTE] You're asking for something thats very basic in Java

Member Avatar for JamesCherrill
0
125
Member Avatar for f4fjks
Member Avatar for WaltP
0
80
Member Avatar for UNDER-18 FG

[QUOTE]int mark 1, mark 2, mark 3, mark 4, mark 5, The best 2 highest marks;[/QUOTE] space is not used in variable name declaration [QUOTE]The best 2 highest marks = mark > 50 + mark > 50[/QUOTE] This is not how you use an operation statement [QUOTE]if ( mark > …

Member Avatar for WaltP
0
89
Member Avatar for umsungun

tokenize the sentence by using space as a delimiter, save each letter in an array then print out the result in reverse

Member Avatar for zeroliken
0
94
Member Avatar for Mindless Z

[QUOTE]We're supposed to have an array that stores every employee that is created, but i dont know how to create/'name' new employee's on the fly.[/QUOTE] Does scanf on each index on the array doesn't solve your problem? [QUOTE]So my real question I guess is how do i set up my …

Member Avatar for Mindless Z
0
156
Member Avatar for terence193

[QUOTE]printf("%d = %d\n",j,freq[i-2]);[/QUOTE] why are you using you using freq[35998]? I think that integer i your using is supposed to be j.

Member Avatar for terence193
0
132
Member Avatar for gizmo7008

Why not use scanf like this? [CODE]printf("Enter two words: "); scanf("%s",x1); scanf("%s",x2);[/CODE] Also why use a while condition when an if else condition can be enough [CODE]for(i = 0; i < c; i++) { if (x1[i] == x2[i]){ x3[i] = x1[i]; } else break; } printf("%s\n",x3);[/CODE]

Member Avatar for WaltP
0
928
Member Avatar for dvidtrnh

You could store the number in an array then check each index for the English word you can use an if else condition for every number from zero to nine in comparing

Member Avatar for WaltP
0
270

The End.