User Profile
Collapse
-
oh i got it..thanks a lot for the help dudes. -
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... -
So you mean to say i must use struct before the class student?Leave a comment:
-
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];... -
-
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,... -
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... -
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;
... -
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)... -
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... -
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;...Leave a comment:
-
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++;
-
#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++;
}
...Leave a comment:
-
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) {
...Leave a comment:
-
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) {
Leave a comment:
-
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++;...Leave a comment:
-
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++;...Leave a comment:
-
Thanks for that help madam :) but how about for the void only and void with parameter? got any ideas?Leave a comment:
-
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>
... -
thanx sir...but im still a little confuse how the while or do-while loop works.
can somebody explain it to me pls...:(Leave a comment:
No activity results to display
Show More
Leave a comment: