User Profile

Collapse

Profile Sidebar

Collapse
dan5348
dan5348
Last Activity: Dec 2 '14, 08:51 PM
Joined: Oct 14 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • dan5348
    replied to I'm having trouble with getting the correct tip
    in C
    Thanks for the help

    ok I added the tiprate
    Code:
    int main()
    {
      int    choice;
      double charge,
      tiprate,
      bonus,
      saleTx;
    	
      bool running = true;
    but the math isn't working still. How do I fix that?
    See more | Go to post
    Last edited by Frinavale; Nov 12 '14, 05:00 PM. Reason: Added code tags and formatted the code so that it is more readable.

    Leave a comment:


  • dan5348
    replied to I'm having trouble with getting the correct tip
    in C
    what are you saying?
    See more | Go to post

    Leave a comment:


  • dan5348
    started a topic I'm having trouble with getting the correct tip
    in C

    I'm having trouble with getting the correct tip

    I'm having trouble with getting the correct tip:
    Code:
    #include <iostream>
    #include <iomanip>
    #include <cmath>
    
    using namespace std;
    
    class Tips {
      private:
      double taxRate;
      
      public:
      Tips();
      Tips(double tRate);
    
      double computeTip(double totalBill, double tipRate);
    			
    };
    
    Tips::Tips()
    {
      taxRate
    ...
    See more | Go to post
    Last edited by Frinavale; Nov 12 '14, 05:00 PM. Reason: Added the question posted in the title of the thread to the body of the thread so that the code has context and added code tags and corrected code indentation to make the code more readable.

  • dan5348
    started a topic How to compare strings ignoring case
    in C

    How to compare strings ignoring case

    Im lost on this.

    It should report whether or not, ignoring case, they are the same.

    Code:
    #include <stdio.h>
    #include <string.h>
    using namespace std;
    void main(void)
    {
    	char str1[25], str2[25], dif;
    	printf("\nEnter the first String:");
    	gets(str1);
    	printf("\nEnter the second String;");
    	gets(str2);
    
    	dif = strcmp(str1, str2);
    ...
    See more | Go to post
    Last edited by Frinavale; Oct 30 '14, 07:43 PM.

  • I dont see what im missing to find out who is first in the class

    i have this so far:

    #include<iostre am>
    #include<string >
    #include<fstrea m>
    using namespace std;

    int main()
    {
    ifstream inputFile;
    string filename;

    string front, back, student;
    int students = 46;

    // Get the filename from the user.
    cout << "Enter the filename: ";
    cin >> filename;...
    See more | Go to post
No activity results to display
Show More
Working...