15,552 Topics
| |
1.if sum is 7 or 11 its a win. 2.if sum is 2,3or 12 it a lose 3.if sum is 4,5,6,8,9,10 it becomes your point 4.to win you continue to roll the dice until you make your point.the playwr loses by rollin a 7 before making the point. requirement:develop the … | |
Two political parties are contesting in the elections in the N number of states in the country ,each party wins some seats every year in each state.after the country elections are over we have the result of both the parties within an array. the two parties considered equal win the … | |
HI, Iam newbie and want the source code to identify the secified color and send it to the client... | |
hello, i'm working on a code where i have to make a calculator. i hope you guyes can check out my code and help. I would greatly appricate any help (: . here is what i have to do, calculator. this calculator keeps track of a #include <stdio.h> #include <stdlib.h> … | |
I have to write a hangman game in Cpp which choose random words from txt file using binary search tree. Here is the code - compilation is successful, but its not working properly, its crashing. Exception - Segmentation fault: 11 Row - if (el.length() <= p->n.length()) Can someone help me? … | |
What are some good reasons for returning an address from a function? | |
Write a program that reads integers, finds the largest and counts the occurrences. Assume that when the user enters it ends the sequence. Example : 3 5 5 5 0 Largest : 5 Occurrences : 3 I can't use arrays . I know I'm suppose to use loops but I … | |
I am trying to do Shortest Remaining Time scheduling algorithms turnaround time. This is the formula. Turnaround Time = Completion Time - Arrival Time I have already sorted my arrays. This is what it looks like my hand. 5,1 done with magical 0 9,2 2nd iteration 1 2,4 1st iteration … | |
Yes I know the code is not complete. I know it will cause an infinite loop. The question is how would I break out of the first for loop and go to the second for loop? Wouldn't using break, break you out of everything? I only wanna break one level. … | |
guys i have this assignment about luhns algorithm and i cant seem to know where to start (i am very weak in functions and arrays) , if anyone can help me out with the start of the i would be very thankful then later on i will be disscussing my … | |
BESIDES having to do a bunch of unnecessary iterations in a for loop with strlen doesn't it also produce weird behaviors? http://www.cprogramming.com/tips/tip/dont-use-strlen-in-a-loop-condition The documentation uses size_t instead of int. I believe I got weird behaviors when it happened. I didn't write it down when it happened so I can't remember … | |
please help me write a program that lets the user enter 5 integers then outputs the folllowing a. whether the integer inputted is odd or even b. determines the largest and smallest number inputted c. sum all odd integer entries d. sum all even integer entries here is the partial … | |
I am having a problem when trying to delete specific record from a text file. Data structure is as follows: typedef struct { char id[9]; char name[50]; float amount,price; }PRODUCT; typedef struct id { char key[9]; int address; }ID;//for searching typedef struct node { ID id; struct node *left,*right; }NODE; … | |
How to detect the keylogger softwares which are running in the system. Keylogger run in hidden mode,by the processes running in the background are us to detect it. Is there any process/me3thod to get complete details of process i.e, how muchmemory,cpu,harddisk spae are using and which files in drive are … | |
| |
hello every body here i got some problem with assign value to arrays, so i want to print multiplication table of the arrays: #include <stdio.h> int main(){ int x=5; int y=5; int i,j; int tab[x][y]; for( i=0; i<x; i=i+1){ tab[i][j]=i; for(j=0; j<y; j=j+1){ tab[i][j]=i; printf("%d", tab[x][y]); } printf("\n"); } return … | |
I have to create a random matrix m*n where m and n are user inputs. Now i have to fill the matrix with random nos. Finally I must have a matrix where each value is either 0 , 1 , a fraction no between 0 and 1, and also sum … | |
I always get errors in c programming while using if and else as " expected expression before else". Why do this error display? | |
Hello, Leonard here. And my next program is a bit of a doozy. I'm making a ToDo List program. I had to make a getData() function to read a file from Notepad, with the day of the month and the task to do on that day and store them into … | |
I'm trying to optimize a Bayesian inference algorithm written in C. I'm looking for fast and accurate open-source libraries for working with probability distributions (both calculating density & drawing deviates - like the rnorm,dnorm,pnorm functions in R). So far I've found a tutorial which suggested the [gsl](http://www.gnu.org/software/gsl/manual/html_node/Random-Number-Distributions.html#Random-Number-Distributions) library but I … | |
i'm trying getting the richedit caret positions. seems that i can't use the caret functions. LONG firstCharIndex(HWND hwnd) { POINT pt; pt.x=0; pt.y=0; LONG n = SendMessage(hwnd, EM_CHARFROMPOS, 0, (LPARAM)&pt); return LOWORD(n); } COORD GetCaretPos( ) { COORD pos; //getting the line from caret position: pos.Y=(LONG) SendMessage(consoleedit, EM_LINEFROMCHAR,(WPARAM)-1,0); CHARRANGE cr; … | |
I'm in the process of designing a console personal/business finance package for Linux. It's easy to identify the advantages of data abstraction through classes, but I'm not inclined to become proficient with STL or containers. Exception handling may become a consideration, but definitely memory allocation via "new". My own implementation … | |
Write a program to find grace marks for a student using switch. The user should enter the class obtained by student and the number of subjects he has failed in uses the follow logic. if the student gets first class and the number of subjects he failed in is … | |
**Well guys , i have a problem , i have got my linked list , it add numbers (to the list) , and show numbers(from the list ) , but i can´t add the numbers of the list , i really need help , if the list would be: 1) … | |
#include <stdio.h> #include <conio.h> void main() { int m; int n; int multi; printf("enter value : "); scanf ("%d", &m); printf("enter value of multiply : "); scanf ("%d", &n); multi = multiply(m,n); printf("the value of multiply : %d", multi); } int multiply (int m, int n) { if (n == … | |
When I try to compile the program below in Eclipse I get two erros, ‘const class Fraction’ has no member named ‘n’ & ‘const class Fraction’ has no member named ‘d’ When I compile it on the command line with g++ -Wall FloatFraction2.cpp Fract7.cpp -o FloatFraction I get more errors … | |
i am trying to write code for login system .. but .. i know how to work normally .. nut how to create ..perfect i dont know , help me | |
Pig is a simple dice game first described by John Scarne in 19451. It is a form of jeopardy dice game, where a players decisions are between protecting current gains, or risking current gains to make greater gains. In Pig, each player takes a turn rolling a 6-sided dice, playing … | |
Hi guys, My name is Leonard E Norwood Jr. I'm a senior at Norfolk State University and a beginning of programming. I'm just working on a small program on my own time to practice. So you're familiar with the playing cards and the logic of dealing a deck with 4 … | |
please help me for making this project you guys is my only hope <3 |
The End.