User Profile

Collapse

Profile Sidebar

Collapse
jmf777
jmf777
Last Activity: Nov 16 '08, 01:40 PM
Joined: Aug 29 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jmf777
    replied to trouble with compiling my program
    in C
    oh duh thanks for the help.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic trouble with compiling my program
    in C

    trouble with compiling my program

    Hi here is my problem when I compile my program it gives me the error " error C2296: '%' : illegal, left operand has type 'double". any help in explaining this is much appreciated.
    Code:
    quot = n1 / n2;
    mod = n1 % n2;
    See more | Go to post

  • jmf777
    replied to basic C++ conversion program help
    in C
    Hey it worked thanks for the quick reply to my problem and the explanation of what I was doing wrong it is much appreciated.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic basic C++ conversion program help
    in C

    basic C++ conversion program help

    Hi here is the problem when my program tries to convert Fahrenheit to Celsius it gives an answer of zero regardless of what degree you put in. Any help in solving this is much appreciated.

    Code:
    #include <iostream>
    using namespace std;
    
    int main (void)
    
    {
    	double inch_feet, inch_yard, inch_cent, inch_meter, fahrenheit;
    
    	double inch_cv_feet;
    	double inch_cv_yard;
    ...
    See more | Go to post

  • jmf777
    started a topic seven strings sort
    in C

    seven strings sort

    Hi if your here to help thanks in advance. My problem is I'm writing a code to take seven strings put in by the user sort them alphabetically than print them, but I my compiler is telling me strcmp command is wrong so I cant compile it and I am sure their are other things wrong please help.

    [CODE}

    #include <stdio.h>
    #include <string.h>

    # define N_STRINGS 7

    void swap(char...
    See more | Go to post

  • jmf777
    replied to function that catches errors
    in C
    the program does handle whitespace correctly.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic function that catches errors
    in C

    function that catches errors

    Hi here is my problem im adding to a program to catch errors.The program below catches errors like integers less than 0 or not equal to 1 but if I put in a number like 223e it doesn't catch the e as an error I know I am missing something in my error = sscanf() line but cant figure it out please help.

    Code:
    char line[MAXLINE];
    int error, n;
    
    do{
    	printf("Input a positive integer: ");
    	fgets(line,
    ...
    See more | Go to post

  • jmf777
    replied to Greatest common divisor
    in C
    never mind figured it out.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic Greatest common divisor
    in C

    Greatest common divisor

    Hi I'm trying to write a program to find the greatest common divisor of 2 numbers input by the user. This is what I got so far:

    Code:
    #include <stdio.h>
    
    int gcd(int a, int b);
    
    int main(void)
    {
    	int a, b,r;
    	
    	printf("Please input two positive integers");
    	scanf("%d%d", &a, &b);
    	gcd(a, b);
    	if (gcd(b, r))
    ...
    See more | Go to post

  • jmf777
    replied to Help with transposition sort
    in C
    Hey sorry for the extremely late post but i solved the problem now I just have to put the printed data into columns.

    Code:
    #include <stdio.h>
    
     void swap(int *, int *);
    
     #define SIZE 8
    
     int main(void)
     {
    	 int a[] = {7, 3, 66, 3, -5, 22, -77, 2};
    	 
    	 int i, j;
    	 
    	  for (i = 0; i < SIZE; ++i)
    	  {
    		  for (j = i +
    ...
    See more | Go to post

    Leave a comment:


  • jmf777
    replied to Help with transposition sort
    in C
    I figured that was the problem but was hoping it was something more easier like something wrong with my code as I can't/haven't figured out how to print the list on each pass of the loop. I been at it for the past 3 days and still can't figure it out. My book is crap so I've been searching websites for more info. any help to help me solve this is greatly appreciated thanks.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic Help with transposition sort
    in C

    Help with transposition sort

    Hi here is my problem and thanks in advance for responding. I'm doing a transposition sort and when I compile the program it -77 -5 -77 2 -77 3-77 but when it prints it should look like this:
    unordered data: 7 3 66 3 -5 22 -77 2
    after pass: 1 -77 3 66 3 3 22 -5 2
    after pass: 2 -77 -5 66 7 3 22 3 2 etc.

    Can you help by pointing me in the right direction to what I am doing wrong?
    ...
    See more | Go to post

  • jmf777
    replied to rock, paper, scissor help C programming
    in C
    Whoops I just figured it out but thanks to everyone that responded and tried to help
    See more | Go to post

    Leave a comment:


  • jmf777
    replied to rock, paper, scissor help C programming
    in C
    I've got the program to at least build and executed it by adding the underlined code.

    Code:
    void report(outcome result, int *win_cnt_ptr,
    			int *lose_cnt_ptr, int *tie_cnt_ptr, [U]p_r_s player_choice, p_r_s machine_choice[/U])
    to my header and my report function but now when I win. It prints funny characters like an up and down character before "you chose" and a smiley face box after "you chose." I'm now...
    See more | Go to post

    Leave a comment:


  • jmf777
    replied to rock, paper, scissor help C programming
    in C
    yeah thats basically it. In select.cpp the player and the machine makes a choice of rock paper or scissor. In report.cpp I want to call the selection that the player and the machine made in select.cpp to report.cpp and print that selection.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic rock, paper, scissor help C programming
    in C

    rock, paper, scissor help C programming

    Hi here is my problem I want to have the outcome of my rock paper scissors game to print outcomes like: You chose paper and I chose rock. You win. The value for player_choice and machine_choice is declared in select.cpp (listed below).

    My question is how would I go about telling, the report.cpp code below to check the select.cpp code for the variable to print?

    #include "p_r_s.h"

    void report(outcome...
    See more | Go to post

  • jmf777
    replied to isvowel assignment C# programming
    in .NET
    Hey thanks for the help! I got the program working by changing the != signs to == and editing the main program. I really appreciated the help and am going to re-read the chapter on relational, equality, and logical operators. Thanks again
    See more | Go to post

    Leave a comment:


  • jmf777
    replied to isvowel assignment C# programming
    in .NET
    yes I have tried running the code. say if I put in asdfjkl it re-puts out asdfjkl and doesnt delete any vowels. I'm thinking their is something wrong with my isvowel function or something wrong with the main program and the way its using the returned 1 or 0 from my isvowel function.
    See more | Go to post

    Leave a comment:


  • jmf777
    started a topic isvowel assignment C# programming
    in .NET

    isvowel assignment C# programming

    Hi,

    I am having serious trouble writing the code for an assignment I am working on. I am a C# beginner and any help would be much appreciated thank you.

    The question is:

    The ancient Egyptians wrote in hieroglyphics, in which vowel sounds are not represented, only consonants. Is written English generally understandable without vowels? To experiment, write a function isvowel ( ) that tests whether or not...
    See more | Go to post
    Last edited by kenobewan; Aug 30 '08, 01:16 PM. Reason: Use code tags
No activity results to display
Show More
Working...