I am programming the game Othello in c#. i have managed to generate the grid however the starting pieces are not in the right position. I think it because the indexing from 0 when I want it to start from 1. Can someone try and help me out. private const string White_piece = "X"; // players piece private const string Black_piece = "O"; // computers piece private const string Empty = " "; const int Row = 9; const int Column = 9; private string[,] board = new string[9,9]; public void Draw_Board() // creates the reversi board { // Codes …

Member Avatar
Member Avatar
+0 forum 6

write a c++ program in which you are required to devolpe a c++ program which encrypts the data of the user after entering his/her message in the character array the user will enter a number a new message will be generated by adding each letter to the number entered by the user

Member Avatar
Member Avatar
+0 forum 1

I'm looking to write a code in vba that takes 4 given numbers and uses mathematical operations on them (add,sub,mult,division,power,factorial) and then lists the results. Any of the operations can be used but all 4 numbers must be used each time. Any help would be greatly appreciated. Thx

Member Avatar
Member Avatar
+0 forum 1

Python to java

Member Avatar
Member Avatar
+0 forum 3

Hi This is Praveen, I am working since 8years as a FrontEnd Developer with strong Knowledge in below mentioned Skills HTML 4 HTML 5 CSS CSS 3 JavaScript jQuery Bootstrap 3 and Bootstrap 4 Angular 2 to 8 React PWA (Angular and React) Require JS KnockOutJS NodeJS Magento 2 FrontEnd

Member Avatar
Member Avatar
+0 forum 2

// MajorProJectMB.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include<cstring> #include<fstream> #include<iostream> #include<string> #include <iomanip> #include <cstdlib> #include <string> using std::ifstream; using std::ofstream; using std::ios; using namespace std; struct project { char comma[10]; double NumFields[10]; string lastfieldName; string firstfieldName; double Toltal = 0; }; void getfile(project Fields[8]); void bubbleSort(project Fields[8], double NumFields[10]); void swap(double *xp, double *yp); void outputfile(project Fields[8]); int main() { project Fields[8]; getfile(Fields); outputfile(Fields); system("PAUSE"); return 0; } void getfile(project Fields[8]) { ifstream inStream; ofstream outStream; int count = 0; inStream.open("Project-Input.dat"); if (inStream.fail()) { cerr << "File not located!"; system("PAUSE"); …

Member Avatar
Member Avatar
+0 forum 9

**Task** Your task is to write a program that will draw graphs and output them as coloured image in the .ppm file format and display them using a suitable external image viewer (IrfanView). The program will use code generated sine waves, and harmonics of these, to calculate and display the harmonic components of a square wave. All sine wave harmonic should be displayed, each in a different colour – and the square wave that results from summing all the sine waves should also be displayed. The resultant waveforms should be output as a single file in the .ppm format. Initially, …

Member Avatar
Member Avatar
+0 forum 26

Hello everyone, I am writing this post again because there were ambiguities in the previous one. I need help with this task tomorrow. I will present what I have, what I got from you and ask which code is best to use to perform this task. I will start with the program I wrote to fill the 6x6 array with random numbers and display it on the console. The program displays random numbers stored in an array in the range of -5 to 64 ... I believe deeply that it contains no error. int x,y; int rand_tab[6][6]; int main() { …

Member Avatar
Member Avatar
+0 forum 5

hai everyone im supposed to create a futsal reservation system which has 3 courts customer name should be shown in the booking table till now the customer name is printing on the table ...but i dont know how to save the name

Member Avatar
Member Avatar
+0 forum 1

*someone can help me to answer this question. Create an array that can hold ten integers, and fill each slot with a different random value from 1-50. Display those values on the screen, and then prompt the user for an integer. Search through the array, and if the item is present, say so. It is not necessary to display anything if the value was not found. If the item is in the array multiple times, it's okay if the program prints the message more than once. Array: 45 39 32 12 44 50 26 42 16 20 Value to find: …

Member Avatar
Member Avatar
+0 forum 1

Hello, I am trying to understand how to use C-style strings in C++. My goal is to store a C-style strings into a string type array. If I pass "This is a test" into word_token, it displays: This Is A test So from here I believe my setup is almost right, I'm just having problems passing these into a string type array Does not print out "This" as I expect it too myArray[*token] ; cout << myArray[0] ; void word_token(char *str){ string myArray[256]; // assuming str <= 256 words char spaces[] = " "; // deliminator char *token = strtok(str, …

Member Avatar
Member Avatar
+0 forum 1

Hello, I am stuck on how to exactly do this problem if anyone could offer me any help with either a worked out solution or just some pseudocode that would be great. Here are the rules and information about the assignment below. Assignment: What is The Game of life? Not to be confused with Hasbro's The Game of Life, this problem refers to British mathematician John Conway's famous cellular automation. The term 'cellular automation' refers to a space (in this case a grid) of cells, which continually transform themselves to create new patterns and states, based on the states of …

Member Avatar
Member Avatar
+0 forum 2

Heres a pic of my database table ![Screen_Shot_2019-11-16_at_2_35_54_AM.png](/attachments/large/4/0749479693675147a0ccc8219b89e87f.png) Im trying to create a search page with drop down selectors to filter through each of the last 8 columns. I want the the drop down selectors to be able to select multiple entries (I have this working already) I also want them to preload values from data already entered into my table columns. (I also got this working with the help of tutorials... although I admit I don't fully understand how this part works) Using these tutorials i've created a php page that contains 8 drop down selectors that automatically pull …

Member Avatar
+0 forum 0

Hey there, so i'm trying to answer this question but i'm hitting a snag. i'm not familiar with the environment so it's very difficult to understand the syntax. I would like someone to help me look through and assist with the syntax. Also how to pass the input to get desired output ![Help.PNG](/attachments/large/4/6672a9ccc30db1329cbe5d306c66b2f1.PNG)

Member Avatar
Member Avatar
+0 forum 2

Hello, I am stuck on where to go with this assignment for checking if the sliding puzzle is solved right or wrong. I will include the context of the assignment so you can see what needs to be included. If you could just share some code or pseudocode to get me started that would be great or a worked out solution that would be good as well. Assignment: The Rules Each 8-puzzle has tiles labeled 1-8 and one empty space denoted by a 0. The commands given signify where you should attempt to move the empty space in relation to …

Member Avatar
Member Avatar
+0 forum 1

Hi, I want to know what is wrong in this code for reading and printing an array, because it gives "the program stopped working" when I run it. #include<stdio.h> int main(void) { int arr[2][3]; readmat(arr,2,3); printmat(arr,2,3); } int readmat(int **mat,int m,int n) { int i,j; for(i=0;i<m;++i) for(j=0;j<n;++j) scanf("%d",&mat[i][j]); } int printmat(int **mat,int m,int n) { int i,j; for(i=0;i<m;++i) { for(j=0;j<n;++j) printf("%d\t",mat[i][j]); puts("\n"); } }

Member Avatar
Member Avatar
+0 forum 2

Hello, I am looking some help with a program. I am trying to parse the following file into a dynamic Array "Database[8][5]". Device ,Gain (beta),Power Pd(W) ,Current Ic(A) ,BVceo(V) 2N3904 ,150,0.35,0.2,40 2N2202 ,120,0.5,0.3,35 2N3055 ,60,120,10,90 2N1013 ,95,50,4,110 MPE106 ,140,15,1.5,35 MC1301 ,80,10,0.9,200 ECG1201 ,130,1.3,1.1,55 I seem to beable to parse the data but it is not loading the data into the array. Any help would be appricated. My code so far is: #include <stdio.h> #include <stdlib.h> #include <string.h> char* Database[8][5]; char temp; int main() { FILE *file; file = fopen("Task4Table.csv", "r"); if(file == NULL) { printf("Could not open the database"); exit(0); …

Member Avatar
Member Avatar
+0 forum 1

I got stuck with this problem and it will be great if someone gives a solution.

Member Avatar
Member Avatar
+0 forum 1

Hello DaniWebian's, This is Muhaimin Sheik, I'm a passionate web developer as back and front end. I was very friendly and helpful person. I want more know about the techie knowledge. Please guide me. Thank you all...!Cheers...!

Member Avatar
Member Avatar
+0 forum 1

Hi, I was learning insertion sort in C. But I need help to clear up my confusion in the following code: int i,j,n; puts("Enter the number of elements: "); scanf("%d",&n); int A[n]; readarr(A,n); int sortedA[n]; sortedA[0]=A[0]; for(i=1;i<n;++i) { j=i-1; while(j>=0 && sortedA[j]>A[i]) { sortedA[j+1]=sortedA[j]; /*marked line 1*/ --j; } sortedA[j+1]=A[i]; /*marked line 2*/ } In the marked line 1, you see that value at position [j] has been moved down in the list to [j+1], so that the position [j] is now vacant. Right? Then, in marked line 2, why has A[i] been assigned to position [j+1]? Because, according to …

Member Avatar
Member Avatar
+0 forum 1

Anyone can fix this code. thank you, only TURBO C program #include<stdio.h> #include<string.h> #include<stdlib.h> #define true 0 #define false 1 struct product { char id[10]; char name[20]; int quantity; int numSold; float price; int discount; float sales; }; struct product prod[30]; int count = 0; FILE *f; int writefile() { int i; f = fopen("inventory.txt", "w"); if (f == NULL) return -1; fprintf(f, "%d\n", count); for (i = 0; i < count; ++i) { fputs(prod[i].id, f); fprintf(f, "\n"); fputs(prod[i].name, f); fprintf(f, "\n"); fprintf(f, "%d\n", prod[i].quantity); fprintf(f, "%d\n", prod[i].numSold); fprintf(f, "%f\n", prod[i].price); fprintf(f, "%d\n", prod[i].discount); fprintf(f, "%f\n", prod[i].sales); } fclose(f); return …

Member Avatar
Member Avatar
+0 forum 1

Ask the user to enter - Name - ID - File Name Randomly choose five grades for that person from 1 to 100 and store them in an array that can hold five integers. Then output the name, ID, and those five grades to the screen and save the output into the specified file. The file will look like: --------------------------------- 220181234 Ahmed Ihab Grade 1 : 60 Grade 2 : 75 Grade 3 : 30 Grade 4 : 96 Grade 5 : 63 ---------------------------------- Note: Write the File using Buffered Writer

Member Avatar
Member Avatar
+0 forum 2

Given two arrays (the first array and the second array) of the same size, each consisting of n positive integers, write a program to determine how many unique integers the second array has. Here a unique integer means that it shows only once in the second array but does not show in the first array. For example, if the first array is [1, 5, 3, 6, 8] and the second array is [2, 4, 2, 5, 9] (with n=5), the second array has two unique integers (4 and 9). What is the complexity of the program?

Member Avatar
Member Avatar
+1 forum 1

Ask the user to enter - Name - ID - File Name Randomly choose five grades for that person from 1 to 100 and store them in an array that can hold five integers. Then output the name, ID, and those five grades to the screen and save the output into the specified file. The file will look like: --------------------------------- 220181234 Ahmed Ihab Grade 1 : 60 Grade 2 : 75 Grade 3 : 30 Grade 4 : 96 Grade 5 : 63 ---------------------------------- Note: Write the File using BufferedWriter

Member Avatar
Member Avatar
+0 forum 1

Task 2: Write a program that simulates an unbiased coin flip. Your program should print true if the coin flip results in a head and false if the coin flip results in a tail. Hint: any value greater than 0.5, represents Head otherwise it represents Tail

Member Avatar
Member Avatar
+0 forum 1

Hi, I was learning 'Selection Sorting' in C and while writing my program I constantly get the error- >[Error] expected expression before '{' token Here's my program- #include<stdio.h> void main(int A[10]) { int i,j; A[10]={2,4,1,9,0,6,5,7,3,8}; for(i=0;i<9;++i) { int Min=i; for(j=i+1;j<10;++j) { if(A[j]<Min) { Min=j; } int temp=A[i]; A[i]=A[Min]; A[Min]=temp; } } for(i=0;i<10;++i) { printf("%d\n",A[i]); } } If I try to initialize A[10] as a parameter in the function, it gives this error- >[Error] expected ';', ',' or ')' before '=' token What's the issue?

Member Avatar
Member Avatar
+0 forum 4

write a C program to sort a csv(student.csv)file using QSORT on LINUX .. please help.. student.csv file containing(student name, percentage)

Member Avatar
Member Avatar
+0 forum 1

![71923951_2309021662681505_5309298929043505152_n.jpg](/attachments/large/4/1849a45b2f18751c208bb45861be2f10.jpg)

Member Avatar
Member Avatar
+1 forum 3

Hi there everybody just needed some help sorting an object array. So the array takes in a title, link, comment, length, and rating of the video. Once the values are put into the array the user inputs whether they want to sort it by title(alphabetically), length of the video (ascending order), and then rating of the video (descending order). The code runs and compiles perfectly fine right now but just dont know how to put in the place the sort functions. ** VIDEO.H** #ifndef VIDEO_H #define VIDEO_H class Video{ public: Video(string t, string l, string c, float time, int a); …

Member Avatar
+0 forum 0

Firstly a little overview - my site uses Wordfence (this is not the issue - just the reason for this to begin with) -- Even if Wordfence is disabled this should still work. *its just what brought this to light.* And... I have been getting numerous login attempts from different places and IP's using the hidden password recovery, or simply force loading names into the admin page. I have seen a pattern emerging, whereas the popular name tries are: administrator, wpadmin, admin, wpadministrator, and a few others. Sometimes in the range of 150+ an hour, quite amazing, and annoying at …

Member Avatar
Member Avatar
+1 forum 6

The End.