User Profile

Collapse

Profile Sidebar

Collapse
Synapse
Synapse
Last Activity: Jan 7 '08, 10:15 AM
Joined: Dec 3 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Synapse
    replied to Class Coding
    in C
    oh i got it..thanks a lot for the help dudes.
    See more | Go to post

    Leave a comment:


  • Synapse
    started a topic Class Coding
    in C

    Class Coding

    Hi guys..i need some help transforming the following code to class style. i dont have any idea about classes. it's only functional but our prof wants it to be in a class coding. i need help.. here's my code.
    [code=cpp]
    #include <iostream.h>
    #include <stdlib.h>

    struct node
    { char name[20];
    int age;
    int id_num;
    node *nxt;
    };

    node *start_ptr...
    See more | Go to post

  • Synapse
    replied to Student List Using insert_at_end method
    in C
    So you mean to say i must use struct before the class student?
    See more | Go to post

    Leave a comment:


  • Synapse
    started a topic Student List Using insert_at_end method
    in C

    Student List Using insert_at_end method

    hi everyone..im trying to create a student list program using linked list that will display all my info of students..but it seems theres a little prob. after i enter my first student the program will exit.. can somebody help me please. thank you


    #include <stdlib.h>
    #include <iostream.h>
    #include <string.h>
    #include <conio.h>

    class student {

    char name[30];...
    See more | Go to post

  • Synapse
    replied to Return to Main Code
    in Java
    I got that line from this forum too but it didn't work.
    See more | Go to post

    Leave a comment:


  • Synapse
    started a topic Return to Main Code
    in Java

    Return to Main Code

    Hello people...i need help in my code. I have a confirm dialog below and it will ask you to repeat the program again. now my problem is that if i choose yes, it will exit the application. here's my code below.


    import javax.swing.JOp tionPane;


    public class palin {

    public static void main (String args[]) {


    String num, right, error, numint;
    int number, num1,...
    See more | Go to post

  • Synapse
    started a topic Ned help in PALINDROME
    in Java

    Ned help in PALINDROME

    aloha people! I need help in my java palindrome program. It's a 5-digit palindrome checker. The code below is running good but i got a few problems on it.

    If I enter 33633, 11211, 45554, it will return

    It's a Palindrome!

    and if I enter 33636 or 11214, it returns

    It's not a Palindrome!

    now my problem is if i enter 00000, it got some errors the one below:

    Exception...
    See more | Go to post

  • Synapse
    started a topic Dialog Output
    in Java

    Dialog Output

    Hello gurus!

    I need a lil help with my program. Its just a piece of code that will compute the 4 basic arithmetic function. but my problem is to display the answer in a single message box.

    here's my code below.

    import javax.swing.*;
    import java.io.*;

    public class arithmetic2 {
    public static void main( String args[] ) {

    String fnum, snum;
    ...
    See more | Go to post

  • Synapse
    started a topic String to Double or Float
    in Java

    String to Double or Float

    hello guys.. i do really need some help here. i have to do the 4 basic mathematical operation by entering 2 numbers with decimal.

    example.

    1st num: 12.50
    2nd num: 6.5

    the answer must be in float or double but with my code below, upon entering a double or float numbers it will show this error:

    java.lang.Numbe rFormatExceptio n: 2.0
    at java.lang.Integ er.parseInt(Int eger.java:414)...
    See more | Go to post

  • Synapse
    started a topic Simple Calculator - EDS
    in C

    Simple Calculator - EDS

    Hello...
    We were asked to create a simple calculator program in our C++ subject by using loops only. i have a problem in creating a loop in the multiplication and division operation so please can anyone help me on this please. and also during the operation selection, if ill enter a character it wont go back to the main program. by the way, my compiler is Dev-C++.
    I need help badly..here's my code below...


    #include...
    See more | Go to post

  • Synapse
    replied to Recursion or Recursive Function
    in C
    i didn't get what you mean...actually i've created a function from the code above that has a return value. here it is:

    #include <iostream.h>
    #include <stdlib.h>

    int product (void);

    int main()
    {
    system("CLS");
    int Ans;
    Ans=product();
    cout << "The answer is " << Ans << endl;
    return 0;...
    See more | Go to post

    Leave a comment:


  • Synapse
    started a topic Recursion or Recursive Function
    in C

    Recursion or Recursive Function

    hi everyone..i need help on the code below. i want to convert it to a recursive function. can anyone help me..pls! thanks a lot!:)


    Code:
    #include <iostream.h>
    
    int main()
    
    {
        int i, j;
        i=0;
        while (i<=4) {
            j=0;
            while (j<=4) {
               j++;
            }
            i++;
        }
        i++;
    ...
    See more | Go to post

  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    #include <iostream.h>

    int product (void);

    int main(void)

    {
    int total;
    total=product() ;
    printf("The output is %d", total);
    getchar();
    return 0;
    }

    int product (void)

    {
    int x, y;
    x=0;
    while (x<=4) {
    y=0;
    while (y<=4) {
    y++;
    }
    ...
    See more | Go to post

    Leave a comment:


  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    And here's one for the Only Void code...

    #include <iostream.h>
    #include <stdlib.h>

    int i, j;

    void product (void);

    int main(void)
    {
    system("CLS");
    product();
    }

    void product (void)

    {
    i=0;
    while (i<=4) {
    j=0;
    while (j<=4) {
    ...
    See more | Go to post

    Leave a comment:


  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    Code:
    #include <iostream.h>
    #include <conio.h>
    
    int product (int x, int y);
    
    int main(void)
    
    {
    	clrscr();
    	int a, b, total;
    	total=product(a,b);
    	printf("The output is %d", total);
    	getch();
    	return 0;
    
    
    }
    
    int product (int x, int y)
    
    {
    
    	x=0;
    	while (x<=4) {
    ...
    See more | Go to post
    Last edited by horace1; Jan 26 '07, 02:52 PM. Reason: added code tags

    Leave a comment:


  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    i created another code...

    include <iostream.h>
    #include <conio.h>

    int product (int i, int j);

    int main(void)

    {

    product (i, j);


    }

    int product (int i, int j)

    {


    i=0;
    while (i<=4) {
    j=0;
    while (j<=4) {
    j++;
    }
    i++;...
    See more | Go to post

    Leave a comment:


  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    maam villa, i tried to create a void with parameter code but it says syntax error and our prof told me that it's not correct. my code is below..

    #include <stdio.h>

    void prn_value(int x, int y);

    int main(void)

    {
    int i, j;
    i=0;
    while (i<=4) {
    j=0;
    while (j<=4) {
    j++;
    }
    i++;...
    See more | Go to post

    Leave a comment:


  • Synapse
    replied to Converting WHILE LOOP into FUNCTIONS
    in C
    Thanks for that help madam :) but how about for the void only and void with parameter? got any ideas?
    See more | Go to post

    Leave a comment:


  • Synapse
    started a topic Converting WHILE LOOP into FUNCTIONS
    in C

    Converting WHILE LOOP into FUNCTIONS

    Hello everyone!:) i need your help again..i got there a code of a while loop program and our prof let us convert it into functions. can anyone help me please. It must be converted into 3 types.

    1. void only
    2. void but with parameter
    3. w/out void but with return value

    Here's the code:

    1 #include <stdio.h>
    2 #include <iostream.h>
    3 #include <conio.h>
    ...
    See more | Go to post

  • Synapse
    replied to Help in for, while and do-while loop
    in C
    thanx sir...but im still a little confuse how the while or do-while loop works.
    can somebody explain it to me pls...:(
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...