15,552 Topics

Member Avatar for
Member Avatar for Kevin_23

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 …

Member Avatar for rproffitt
0
175
Member Avatar for Nivetha.R

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 …

Member Avatar for David W
0
144
Member Avatar for Paulina_1

HI, Iam newbie and want the source code to identify the secified color and send it to the client...

Member Avatar for rubberman
0
55
Member Avatar for Max_14

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> …

Member Avatar for Max_14
0
208
Member Avatar for Dimitar_1

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? …

Member Avatar for tinstaafl
0
192
Member Avatar for COKEDUDE
Member Avatar for rproffitt
0
78
Member Avatar for Max_14

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 …

Member Avatar for jnneson
0
163
Member Avatar for COKEDUDE

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 …

Member Avatar for Taywin
0
133
Member Avatar for COKEDUDE

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. …

Member Avatar for overwraith
0
154
Member Avatar for joe97

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 …

Member Avatar for joe97
0
5K
Member Avatar for COKEDUDE

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 …

Member Avatar for ddanbe
1
228
Member Avatar for progteacher2

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 …

Member Avatar for Taywin
0
111
Member Avatar for negru

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; …

Member Avatar for rproffitt
0
270
Member Avatar for Ananthoju

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 …

Member Avatar for overwraith
0
219
Member Avatar for sherwin_2
Member Avatar for rproffitt
0
108
Member Avatar for chrisschristou

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 …

Member Avatar for rproffitt
0
286
Member Avatar for san_man

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 …

Member Avatar for ddanbe
-2
313
Member Avatar for raj208851

I always get errors in c programming while using if and else as " expected expression before else". Why do this error display?

Member Avatar for Taywin
0
784
Member Avatar for Leonard_3

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 …

Member Avatar for rubberman
0
185
Member Avatar for Agilemind

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 …

Member Avatar for rubberman
0
149
Member Avatar for cambalinho

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; …

Member Avatar for cambalinho
0
550
Member Avatar for ShiftLeft

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 …

Member Avatar for ShiftLeft
0
1K
Member Avatar for srikanth112

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 …

Member Avatar for Ali_52
0
639
Member Avatar for Aldair -

**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) …

Member Avatar for Taywin
0
213
Member Avatar for Izzah_2

#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 == …

Member Avatar for Izzah_2
0
163
Member Avatar for lewashby

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 …

Member Avatar for マーズ maazu
0
561
Member Avatar for Divyang_1

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

Member Avatar for jwenting
0
232
Member Avatar for joe97

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 …

Member Avatar for joe97
0
1K
Member Avatar for Leonard_3

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 …

Member Avatar for tinstaafl
0
3K
Member Avatar for christian_5
Member Avatar for rproffitt
0
62

The End.