Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~858 People Reached
Favorite Tags
c x 14
c++ x 2
Member Avatar for Ferny84

We're supposed to create a program using TDD in our CS class but i'm not entirely sure how it works... You're supposed to create a fail test before you write code...how can you do that? I can't find any examples online :(

Member Avatar for Ferny84
0
97
Member Avatar for Ferny84

I'm having problems with this c++ program. I need to read a file containing years on each line, and determine if the year is a leap year. The isLeap function looks fine, i'm just having problems actually reading the file and implementing the function. Can anyone help me out? [CODE]#include …

Member Avatar for Ferny84
0
126
Member Avatar for Ferny84

Ok, so i'm supposed to create this ADT structure and i'm having problems storing data into a function and printing it. These are the three files I have: [CODE]#include "myBook.h" #include <stdio.h> #include <stdlib.h> Book *createBook(char title, float price, int stock, char person) { Book *myBook; myBook = (Book*) malloc(sizeof(Book)); …

Member Avatar for Radical Edward
0
89
Member Avatar for Ferny84

Can someone please show me an example of how to read lines from a file with this format: Book One 49.99 1 Authors Name I know I am supposed to use fgets since there is whitespace in the strings, i'm just not sure how to read and store the data …

Member Avatar for Ancient Dragon
0
113
Member Avatar for Ferny84

I am stuck on this program that I am supposed to create. It has to ask the user for a text file where the format looks like: MATH 101 GEOLOGY 101 GYM 101 Then i'm supposed to store the information from the file in an array which then gets pointed …

Member Avatar for Ferny84
0
87
Member Avatar for Ferny84

I'm supposed to ask the user to enter a number of marks, and to decide what each mark is. Then my program is supposed to find the min and max in the array, so far this is what my code looks like: [CODE]#include <stdio.h> void findMinAndMax(int arrayMarks[], int numOfMarks) { …

Member Avatar for Ferny84
0
130
Member Avatar for Ferny84

Hi everyone, I am having some trouble here... I am asking the user to enter a file, and that file will read the contents and determine if the student will pass or fail the class. That part I am having trouble with is when I have to decide if the …

Member Avatar for csmgsarma
0
118
Member Avatar for Ferny84

Hey everyone, I'm trying to get this code to work... [CODE]#include <stdlib.h> #include <stdio.h> #include <stdbool.h> int allPrimes(int n) { int kiloN = n*1000; int count = 0; int i; for(i = 2; i <= kiloN; i++) { boolean hasfactor = false; int j = 2; while(j<i and !hasfactor) { …

Member Avatar for Aia
0
98