IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Math Preperation Zone: Program Codes and Algorithms

+5
BIT0129-Tabassum
Saiful
BIT0117-Ibrahim
BIT0115-Efat
BIT0122-Amit
9 posters

Page 2 of 2 Previous  1, 2

Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0122-Amit Fri May 21, 2010 2:22 pm

Hey mostafa, download this [You must be registered and logged in to see this link.]
It contains some,not all, and not few flowcharts.
both downloading and unzipping passwords are
Click on spoiler to view.

Spoiler:

In case you can't open any jpg file, try renaming the extension to png. I kind of messed up the extension

Beat up

BIT0122-Amit
Founder
Founder

Posts : 4187

https://iitdu.forumotion.com

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0122-Amit Fri May 21, 2010 4:17 pm

Code:

*****
=========================
Simple Trapezoidal Rule Algorithm to determine integration of a given function F(x)
=========================
*****


1. Determine the lower limit a and upper limit b of integration
2. Determine the segmetation width h
3. Calculate the number of segmentations n = (b-a)/h
4. Determine the initial value of sum as ( F(a) + F(b) )/2.0
5. Calculate sum = sum + F( a + i*h ), set i=i+1
6. If i<=n-1; go back to Step 5
7. Set ict = sum * h
8. Write the value of ict as integration result
9. Stop

Alternative approach (from step 5):
5. For i=1,2...n-1
 i. set sum = sum + F(a + i*h)
Repeat i
6. set ict = sum * h;
7. Write the value of ict as integration result
8. Stop.


BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0122-Amit Fri May 21, 2010 5:30 pm

Code:

/*
Differentiating continuous equations
code by Amit
*/
#include<math.h>

 
#include<stdio.h>

 
double sinv, sindiff, value=0, h=.031416;

 
double differ() {

    if (value==0) {

        return ((sin(value+h)-sin(value))/h);

    } else if (value==3.1416) {

        return ((sin(value)-sin(value-h))/h);

    } else {

        return ((sin(value+h)-sin(value-h))/(2*h));

    }

}

 
int main(void){

 
    int i;

 
    printf("\"X\",\"SinX\",\"Sin'X\"\n");

 
    for (i=1;i<=100;i++) {

        if (value>3.1416)value=0;

        sinv=sin(value);

        sindiff=differ();

        printf("\"%f\",\"%f\",\"%f\"", value, sinv, sindiff);

        printf("\n");

        value+=(3.1416/6);

    }

 
    return 0;

 
}


Last edited by BIT0122-Amit on Sat May 22, 2010 3:21 am; edited 2 times in total
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0117-Ibrahim Fri May 21, 2010 8:30 pm

ok guy's ........proceed on....you can complete your journey definitely...But i have a confuse why Alim is inactive at now????????
BIT0117-Ibrahim
BIT0117-Ibrahim
Study Moderator
Study Moderator

Course(s) :
  • BIT

Blood Group : B+
Posts : 96
Points : 234

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0122-Amit Fri May 21, 2010 8:37 pm

Alim gave all the codes required for tomorrow's exam in [You must be registered and logged in to see this link.] topic
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0117-Ibrahim Fri May 21, 2010 9:03 pm

Thank you Alim You are very good boy.... Smile Razz
BIT0117-Ibrahim
BIT0117-Ibrahim
Study Moderator
Study Moderator

Course(s) :
  • BIT

Blood Group : B+
Posts : 96
Points : 234

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0130-Shakkhor Sat May 22, 2010 2:11 am

BIT0122-Amit wrote:The codes of chapter 12 by rayhan are available [You must be registered and logged in to see this link.]


Well, this is interesting lol! Rayhan o taile code korse Razz abar forum eo dise Razz pants o...err...hats off Razz
BIT0130-Shakkhor
BIT0130-Shakkhor
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 209
Points : 328

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by BIT0122-Amit Sat May 22, 2010 2:21 am

BIT0130-Shakkhor wrote:
BIT0122-Amit wrote:The codes of chapter 12 by rayhan are available [You must be registered and logged in to see this link.]


Well, this is interesting lol! Rayhan o taile code korse Razz abar forum eo dise Razz pants o...err...hats off Razz

Josh dialog Very Happy Very Happy Very Happy very very funny very very funny
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by Saiful Sat May 22, 2010 10:53 am

a
Saiful
Saiful
Beta Release
Beta Release

Course(s) :
  • BIT

Blood Group : A+
Posts : 50
Points : 88

Back to top Go down

Very Important! Read this! Re: Math Preperation Zone: Program Codes and Algorithms

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum