User Profile

Collapse

Profile Sidebar

Collapse
mido elnaggar
mido elnaggar
Last Activity: Jul 8 '10, 07:12 PM
Joined: Apr 25 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mido elnaggar
    replied to problem using rpn
    in C
    ya i've only made the first level of c language in my field of study and here is the whole code i've made till now:
    Code:
    #include"stdio.h"
    #include"stdlib.h"
    #include"string.h"
    char prefix[50];
    int stack[50];
    int top;
    char infix[50];
    char postfix[100];
    int pre(char x)
    {
    	switch(x)
    	{
    	case'+':
    	case'-':
    		return 1;
    ...
    See more | Go to post

    Leave a comment:


  • mido elnaggar
    replied to problem using rpn
    in C
    look;my assignment project is to make a code that performs matrix calculations while the entry is as in the following example:
    A = [4+3-2*3+3/2 (1+2*(2+3)/(5-4*5)-3) 4*5*2/(19+3); 2.1+3.2 2.6-6/4.1 3.2+1.5; 2 4 5]
    B = [1 2 5; 5 2 2.1; 3 4 1]
    C = A+B
    D = A*B
    E = C/D
    The Calculated Value for E is:
    E=
    -1.3188045253055 4940000 1.1616421657009 4900000 -0.8846204118722 6370000...
    See more | Go to post

    Leave a comment:


  • mido elnaggar
    replied to problem using rpn
    in C
    the correct answer is 2 but it gives 3.6
    cause it didn't take the precidence of those between brackets
    all i want is amodification to operate on between brackets first and then continue....
    See more | Go to post

    Leave a comment:


  • mido elnaggar
    started a topic problem using rpn
    in C

    problem using rpn

    i 've done this code for converting a normal entry by user into rpn ,however this case doesn't work
    1+(2+3)/5->1235/++ which gives wrong answer
    the code is as follows:
    Code:
    #include"stdlib.h"
    #include"stdio.h"
    #include"conio.h"
    #include"string.h"
    void main()
    {
    	char n[20][100]={""};
    	char o[100]={""};
    	char c[100];
    ...
    See more | Go to post

  • mido elnaggar
    started a topic rpn calculator
    in C

    rpn calculator

    i ve done so far this code but it deals only with 1 digit numbers i dont know how to make it work for 2 or more digited no.s using atoi or atof functions

    #include"stdio. h"
    #include"stdlib .h"
    #include"string .h"
    char postfix[100];
    int stack[100];
    int top=-1;
    void push(int x)
    {
    top++;
    stack[top]=x;
    }
    int pop()
    {
    ...
    See more | Go to post
No activity results to display
Show More
Working...