Posts
 
Reputation
Joined
Last Seen
Ranked #543
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
2
Posts with Upvotes
1
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
0 Endorsements
Ranked #864
~18.9K People Reached
Favorite Forums
Favorite Tags
c++ x 37
c x 10
Member Avatar for orwell84

okay, so I wrote a program in Perl to find prime numbers and, when learning C, I decided to translate it into C. The thing is that...well...it doesn't work. No matter what I do, I get the same message when I say ./primes.c at the terminal: Segmentation fault. I know …

Member Avatar for orwell84
0
111
Member Avatar for blue3hree

please answer me.show why my code does not loop and it repeats question number 1. [CODE] #include <stdio.h> #include <stdlib.h> #include <time.h> /*prints the ASCII art for "FAIL"*/ void ascii_fail(void) { printf(" /%c__%c /%c %c\n", 92,92,92,92); printf(" /:/ _/_ /::%c %c ___ \n", 92,92); printf(" /:/ /%c__%c /:/%c:%c %c /%c__%c\n", …

Member Avatar for zalezog
0
205
Member Avatar for daeuse

I can't seem to figure out what I am doing wrong here. I can either get my loop to play indefinitely, not replay at all, or not initiate in the begging. I'm very new to programming & would appreciated any help. Code: [CODE] int main() { int weight ; // …

Member Avatar for daeuse
0
209
Member Avatar for ueoptimum

Sorry for disturb you all, but a I'm newbie..because my teacher give a assignment.. this my assignment.. [B] Machine Problem[/B] 1. Make a C program that will display "I will pass PRGLF" on the center of the screen. 2. Design a program in C language that will display "#" at …

Member Avatar for zalezog
-1
126
Member Avatar for RobBrown

I am having some problems with writing a 2d array, then displaying it, and then showing the sum of all of the elements. A major part of this problem is that i nave to write three seperate functions to achieve this. it is supposed to do this: [QUOTE]For this exercise …

Member Avatar for anandi ilu
-1
717
Member Avatar for gretty

Hello I have a program that prints a menu & the user is prompted to input a choice(1,2 or 3) if they input anything else, the output should be "Invalid Choice". [B] My Problem[/B] is that if a user inputs anything other than 1,2 or 3, then the program crashes, …

Member Avatar for mrnutty
0
223
Member Avatar for gretty

Hello I have a program I am trying to make which takes in a word pattern (eg; d?ll, h?l?o, go?dby? etc) & searches an 'array containing different words' to find any words in the array that match the input word pattern. So for example; if I input 'd?ll', the program …

Member Avatar for VernonDozier
0
420
Member Avatar for jake43

I need help to sort this numbers, but the problem is it won't like i want it to be with the decimals. I tried changing the int to double but then the program will not run. Here is the code, please provide feedback. [code=cplusplus]#include<iostream> using namespace std; // function prototypes …

Member Avatar for mrnutty
0
203
Member Avatar for dzhugashvili

hey, I am writing a password cracker. But I now have been thinking about separating the word generator from the actual encrypt and check function (for the sake of flexibility and convenience). I noticed John the Ripper does some operations like this. I was thinking something like this: [CODE]wordgen --stdout …

Member Avatar for dzhugashvili
0
300
Member Avatar for gretty

Hello I have made a function that determines whether 2 words are an anagram or not. [B]My Problem is:[/B] that if the word contains 2 or more of the same letters(eg hello, arrest, gall) the function doesn't work even when the 2 words input are an anagram, If i input …

Member Avatar for mrnutty
0
511
Member Avatar for hollywoood

Hello everyone.... I have gotten this far with my mortgage calculator....the problem is the while loop and the actual calculation isn't working correctly. The while loop really doesnt do what i was hoping for it to do...and being pretty amature at this...i am not sure where to go. i built …

Member Avatar for hollywoood
0
771
Member Avatar for hollywoood

Hello everyone. I am pretty lost when it comes to C++, but for class i have to create this mortgage calculator. I think i have this part of the assignment done, but i can not figure out how to convert either the last number, or the user input to a …

Member Avatar for zalezog
0
867
Member Avatar for des6043

what's wrong about this? why when i compile,it come out expected primary-expression? what is that? [code=c] #include<stdio.h> #include<conio.h> main() { float Lab,Mid,Pro,Quiz,Final,Total; printf("\nEnter your mark for Lab:"); scanf("%f",&Lab); printf("\nEnter your mark for Mid Exam:"); scanf("%f",&Mid); printf("\nEnter your mark for Quiz:"); scanf("%f",&Quiz); printf("\nEnter your mark for Project:"); scanf("%f",&Pro); printf("\nEnter your mark …

Member Avatar for des6043
0
149
Member Avatar for DoEds

//Make an interactive program that will ask for hourly rate of the employee and the number of hours worked in a day. As DOLE mandates, more than 8 hours of work a day is considered OT (overtime) so the wage will be 1.5 * hourly rate after the 8 hours …

Member Avatar for DoEds
0
166
Member Avatar for gcah

Does any one know how to get the index value in a 1 dim array of a returned character or integer? For example the value is 15 but I need to know where 15 is on the array, position a[0] or a[15] etc. thanking you in advance

Member Avatar for gcah
0
4K
Member Avatar for Cromarte888

Alright, I'm down to the nitty gritty absolute end of a fully functional hangman game. There is just one part where I am absolutely stuck. When you get a wrong guess, the game successfully draws the gallows. I have no issues with wrong guesses. It's the right guesses that has …

Member Avatar for Cromarte888
0
228
Member Avatar for pltndragon

I have to drop the lowest score, and i can't include it in the calculation of the average. for input validation cant accept negative numbers for test score. #include <iostream> #include <iomanip> using namespace std; void arrSelectSort(float *, int); void showArrPtr(float *, int); void showAverage(float, int); int main() { float …

Member Avatar for NathanOliver
0
2K
Member Avatar for lotrsimp12345

here's my code, don't see why it doesn't print out [code] #include <iostream> using namespace std; int main() { cout<<"enter a passage into input to find out how difficult it is to read\n"; string passage; cin>>passage; char letter; int space=0; while(letter!='\n') { if(isspace(cin.peek())&&letter=='\n') { cout<<"from space"; space=space++; } } cout<< …

Member Avatar for Nick Evan
0
226
Member Avatar for bhagyaraj

Hello,I need help with the following series (sorry I forgot what its called..) 1/1! - 2/2! + 3/3! -4/4!....upto n terms Here's my program : [CODE]#include<conio.h> #include<stdio.h> #include<float.h> void main() { float com=0,j=0,j1=0,ans=0; //variable decl of float type int tillw,i,no=0,fac1=1,fac=1,f1,f2; //variable decl of int type clrscr(); printf("\n\n\t\t *********************************"); printf("\n\t\t ---------------------------------"); …

Member Avatar for bhagyaraj
0
194
Member Avatar for massivefermion

good time people I have a code like the one below: [code=c++] #include <vector> #include <stdio.h> #include "mymath.h" using namespace std; int main(){ int n; char a='y'; do{ cout<<"\n----------------------------------------\n"; cout<<"Enter a number for prime factorization : "; cin>>n; cout<<"\n----------------------------------------\n"; int *result=pfact(n); for(int i;result[i][0]!=0;++i){ if(result[i+1][0]!=0) cout<<result[i][0]<<"^"<<result[i][1]<<"*"; else cout<<result[i][0]<<"^"<<result[i][1]<<"=";} cout<<n; cout<<"\n----------------------------------------\n"; cout<<"Do …

Member Avatar for iamthwee
0
140
Member Avatar for YingKang

After user choose ticket type(first class, business, or economy) and desired seat, for example row 2 A, the program will output the form: A B C D E F row 1 * * * * * * row 2 X * * * * * // now user chooses row …

Member Avatar for YingKang
0
2K
Member Avatar for songweaver

Hey guys, I need help with this program which I have a function that calculates this formula for total house cost and then have an instruction function that asks for the input, then in main has the output. Can anyone tell me waht I am doing wrong, I think I …

Member Avatar for zalezog
0
151
Member Avatar for erialclaire_238

Newbie here. i need to create a program with this output: Enter 5 values: 3 4 5 7 9 Enter a number to search: 4 4 found in location 2 Anyone who can help me on this? Tnx, Claire

Member Avatar for skatamatic
-1
97
Member Avatar for FEARmike21

I am trying to get a program working, and im half way there, I think. What the program must do is take input from the keyboard and then capitalize every first letter of every word. Here is my entire program so far... [code] #include <stdio.h> #include <iostream> using namespace std; …

Member Avatar for siddhant3s
0
138
Member Avatar for nparrish15

I've been working on a program and have hit a roadblock. I know conceptually what to do, but I'm having trouble implimenting it. Ok, so what it's suppose to do is take them randomly generated numbers that have been put in arrayints and factor them. This right now for an …

Member Avatar for arghasen
0
126
Member Avatar for Himerz

Hi again people. I am stuck on this array that converts lower case letters to upper case letters. I need to find out how to make it not display strange characters after the letters are entered. I know it has something to do with the 'null' terminator, but I am …

Member Avatar for zalezog
0
138
Member Avatar for bemo55

Hello! I was having trouble with this program i keep getting undeclared identifier errors for my seat array and my seatnumber variable. I was also wondering if i was going about writing this program the right way. Arrays are kinda new to me. This is the problem (Airline Reservatins System) …

Member Avatar for zalezog
0
122
Member Avatar for FrancisC07

hi guys..! i need some help on how can i print out the output of my program.. the problem is, it will only print out the first char of a characters and i don't know how to use the pointer using an multidimensional array. ex. input: jhonny output: j here's …

Member Avatar for zalezog
0
133
Member Avatar for AdRock

I'm trying to get each line of text of a file split into words and then put into an array I found an exmaple oc cpluscplus.com and their example works but when i try to edit to make changes to read the line of text from a file i get …

Member Avatar for Murtan
0
2K
Member Avatar for nitu_thakkar

suppose i want to do shift left opeartion on x=1010 y=x<<1 it will shift left the value & make x=0100 but how can i store that shifted value... in other variable...? please help me to solve this query

Member Avatar for MosaicFuneral
0
136