User Profile

Collapse

Profile Sidebar

Collapse
reshmidoudou
reshmidoudou
Last Activity: Oct 11 '06, 01:52 PM
Joined: Oct 10 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • reshmidoudou
    started a topic Who can help?This is Urgent
    in C

    Who can help?This is Urgent

    i am doing a program where I have to input an equation and from there , there must be only 5 inputs from the keyboard if more than 5 inputs are done the pgm must display an error message. The program is as follows:

    int var1, var2, result;
    string eq, op;

    cout << "Type the equation : ";
    cin >> var1 >> op >> var2 >> eq >> result;

    example if the user...
    See more | Go to post

  • reshmidoudou
    started a topic validation
    in C

    validation

    i am doing a program where I have to input an equation and from there , there must be only 5 inputs from the keyboard if more than 5 inputs are done the pgm must display an error message. The program is as follows:

    int var1, var2, result;
    string eq, op;

    cout << "Type the equation : ";
    cin >> var1 >> op >> var2 >> eq >> result;

    example if the user...
    See more | Go to post

  • reshmidoudou
    replied to Splitting a string into different variables
    in C
    Thanks for the code, guys. Another question, I have to test the maximum input done on the screen, let me explain when keying the input after the 5th input the pgm should display a message like invalid input.

    example : I type the equation

    2 + 3 = 5 (input = 5 )

    but if I type

    2 + 3 = 5 + 0 (input more than 5)

    how do I do the test since the coding is like that@
    ...
    See more | Go to post

    Leave a comment:


  • reshmidoudou
    started a topic Splitting a string into different variables
    in C

    Splitting a string into different variables

    a string contains an equation and I have to break the string into integers and other variables :

    example of the string is "2 + 3 = 5"

    I have tried to use substr but it does not work as I can have "120 - 30 = 90" so the integers are of no fixed length.

    How can I do that, please help!
    See more | Go to post

  • reshmidoudou
    replied to Validation Of Variables
    in C
    Who can answer this for me please, thanks?...
    See more | Go to post
    Last edited by reshmidoudou; Oct 11 '06, 09:23 AM. Reason: NO ONE ANSWERS MY QUESTION

    Leave a comment:


  • reshmidoudou
    started a topic Validation Of Variables
    in C

    Validation Of Variables

    i dont know if I'm in the right thread if some1 can help me on this please:

    The program should display an Invalid Input if more than 5 variables are entered, how do I do this :

    Note that a, b and c must be integers

    example the equation is a + b = c.

    If the user enters a + b = c + d the program should display an invalid input.

    #include <iostream>
    #include <string>...
    See more | Go to post

  • reshmidoudou
    replied to proof of mathematical equation
    in C
    I am doing it just want to confirm whether I'm doing right...
    See more | Go to post

    Leave a comment:


  • reshmidoudou
    replied to proof of mathematical equation
    in C
    yes I know I have to use the CIN for input

    I want to know how to do the equation on a single line. Shall I use the getline() and use strings or substrings...
    See more | Go to post

    Leave a comment:


  • reshmidoudou
    started a topic proof of mathematical equation
    in C

    proof of mathematical equation

    I am new to c++ and have to write a program that takes a line of characters as its inout and represents a mathematical eqaution of the form a + b = c and checks whether it is correct. example 2 + 3 = 5 should report "CORRECT" whereas the equation 2 + 3 = 6 should report "INCORRECT" . Please do help!
    See more | Go to post
No activity results to display
Show More
Working...