- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
12 Posted Topics
Hi, I wrote the following program: #include <stdio.h> #include <stdlib.h> #define TRUE = 1; #define FALSE = 0; static int *arr; static int size=0; void createSet() { arr= (int *)malloc(sizeof(int)); size=0; }/*createSet function*/ void putInSet(int num) { int *temp; size++; temp=(int *)realloc(arr,size*sizeof(int)); if(temp!=NULL) { arr=temp; } else { printf("Insufficient amount … | |
I'm trying to code a program that categorized a series to be one of the following for example: 1. "demo" ; "abc" - are both hard ascending series. 2. "aabc" ; "aa" ; "zz" - are an ascending series. 3. "zzabcd" - is a non-ordered series. I wrote the following: … | |
Hi guys, I wrote the following code: public static boolean match(int[] a , int[] pattern) { //need to use the overloaded method, in order to work with the static method. return match(a,pattern,0,0); } /** This is an overloaded method that match between a pattern to a given string (as an … | |
Hi all, I wrote a simple app that shows your current location depends on GPS, WiFi, 3G signals, and shows in a Text View the location as city,street, country. The problem is that I saw that the location is pretty updated with WiFi\ 3G \ GPS, but the Text View … | |
Hello All ! I'm trying to write a Robot Class who have several methods. One of its methods is move() that move the robot the direction his looking at, one step ahead. I'm getting an error on this: [CODE]switch (Direction) {[/CODE] If some one can help me find the mistake, … | |
Hello all, I have a problem with a function I wrote. I wrote a main() that takes from current library a *.c file (that the user gives by the argv[1]) and make a copy of itself but without the comments and saves it as *.c1, so after this operation we … | |
I try to imitate the first stage of pre-processor, which is to remove comments from a *.c file. The main principle is that a *.c will be read and the program will create another file *.c1 which is an exact copy of *.c but without comments(c/c++ comments). Example(in Linux): >./myprog … | |
I need to write a code that receive from the user numbers (must use with EOF) and store them into a matrix. There are some more requirements: 1. Matrix must be only N*N size, while N will be defined at top. 2. If user is trying to enter more than … | |
I wrote an Ansi C# code that finds the smallest number in a several unknown function calls. You can see the code, it is very clear. just need help with how to make the program to not ignore always the first number in the list of each argument list... and … | |
I need to create a static boolean method, boolean isValid(String str) which gets a string and check the brackets in it... a correct expression is an expression as one of the following: 1) an empty string or a string that includes space only in it. 2) st1 +"" +st2, which … ![]() | |
[CODE]public static boolean what (Node n) { if (n == null) return true; if (n.getLeftSon()==null && n.getRightSon()==null) return true; if (n.getRightSon()==null) return (n.getNumber() % n.getLeftSon().getNumber() == 0) && what (n.getLeftSon()); if (n.getLeftSon()==null) return (n.getNumber() % n.getRightSon().getNumber() == 0) && what (n.getRightSon()); return (n.getNumber() % n.getLeftSon().getNumber() == 0) && (n.getNumber() % … | |
I need to write a method which check for every junction in a tree if he is a multiply of his sons. The method signature must be as following: public static boolean isChildrenProduct (Node node) For example: if the father is 10 and the sons are 5,2 returns true. Can … |
The End.