15 Topics
|
|
Hi all; how can i find equal string in 2D array in java in this program,, i mean in this code i have 2D array 2 rows and 4 columns,for example in my code the equal string is "orange" ,,so how can search for any equal string in 2D array … |
|
In this program: 1) an integer typed 2D array named student_scores[Rows][Cols] is initialized by providing initialization list 2) then this array is passed to a function named total_scores which recevies two aurguments .- the first aurgument is for array with explicit use of column subscript .- the second one is … |
|
Hi everyone! So, I hereby hope to show that I've made progress in coding java (largely due to the help of this great community). I want to thank everyone for dealing with me (especially James). :) The goal: The code below is supposed to seed a layout of boats into … |
|
Hello, I was having some trouble related to a code. I wanted to pass a 2-D array as argument to a function,but I'm getting an error saying 'Expression Syntax in function Main'. I am trying to do it like this :-> void input(int **a[][10],int b,int c) { int i,j; printf("\nEnter … |
|
Hello everyone!! I have a problem about memory allocation, i use calloc() to initialize all elements in array to be zero. This is my code: #include <stdio.h> #include <conio.h> #include <stdlib.h> #include <time.h> #define sizes 1200 main() { double** arr; int m[sizes]; int i,j,k; srand((unsigned)time(NULL)); arr= (double **) calloc(sizes,sizeof(double*)); for(k=0; … |
|
Hello, everyone! I am trying to generate a random number with Java, but random with the fix number of reviewers per object.Example: I have 5 reviewers(r(i)) and 5 objects(o(j)), a[i][j] is the evaluation score that reviewer(r(i)) has evaluated object(o(j)), and my question is i want to labeled each object should … |
|
hello :) i've Two questions to ask. i'm working on MFC SDI, i'm less familiar to MFC. i found that a way to print a string in MFC SDI is: [CODE]pDC->DrawText( " mc Test Ellipse ", &rect , DT_PATH_ELLIPSIS );[/CODE] but i have to print a 2D array in MFC … |
|
[CODE]//Program to find the sum of the main and right diagonals of a 2D array import java.io.*; public class Diagonals { public static void main(String[]args)throws IOException { int arr[][]={{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int maindiag=0;int rightdiag=0; for(int i=0;i<4;i++) { for(int j=0;j<4;j++) { if(i==j) { maindiag=maindiag+arr[i][j]; } } } System.out.println("The sum of the main diagonal … |
|
Hi All if anyone could help me that would be great! currently i have an array which enables a user to input: Student Name Maths Mark English Mark Science Mark Array: StudentArray(25,3) i have this array output the data to a listview box. Column 1: Student Name Column 2: Maths … |
|
Hi, my assignment asked me to make a 3 row, 7 column array that asked the user to input amount of food for 3 monkeys. 7 represents the number of days. It should tell the user the average, highest and lowest amount for this.. Here is what I've got so … |
|
Sir, i'm new here searched the forums and web. I'm a beginner and dont know C very well. The Question actually is this: [QUOTE]Write a C function called DistinctWords that counts the distinct words in its input string and prints them in the descending order of number of its occurrence. … |
|
So, I'm working on a project for my Intro to Software Development course; it's a sudoku puzzle program. So far, I've encountered two big bugs: 1.) When I wrote the code in Visual C++, the display worked fine(it showed up on the screen as a normal puzzle), but when I … |
|
Hello, I have a a problem copying individual words inside 2D array. Array is dynamically created and initializes perfectly, but as soon as i call my function, and if i have 2 or more spaces between the words, its copying the spaces inside the next index element of the array. … |
|
I'm working with 2d arrays (which I kinda understand) and a bubbleSort, which I sorta but don't really understand and perhaps those * and & which I'm totally lost on, especially the * which can mean what it means or the opposite of what it means? I don't get that. … |
|
i have a problem with a program which gets a matrix[3][3] (with values 1-20.) i want to print the index of cells whose surrounding cells all have lower values. in a matrix 0 0 0 0 1 0 0 0 0 it supposed to print only [1][1]. can someone look … |
The End.