User Profile

Collapse

Profile Sidebar

Collapse
sircool
sircool
Last Activity: Aug 23 '07, 11:14 AM
Joined: Oct 13 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • sircool
    replied to Dynamic Array
    in C
    if you use like that definitation
    int square[n][n] that means you made a array static.So n must be const that does not matter you return a n value from any function.
    i will make a dynamic aray declaration you can use

    int **arary,row,col omn; // two asterix means you make two dimentional aray
    than you will request memory (in C malloc, in C++ you can use new function)

    array=new int*[row];
    for(int...
    See more | Go to post

    Leave a comment:


  • sircool
    started a topic parameters to main
    in C

    parameters to main

    hi
    I wrote a program and that should takes some parameters when it is executed
    like that

    program.exe /s

    and I wanna write if statements according to parameters but i could not.
    for instance;

    Code:
    #include<stdio.h>
    
    main(char c)
    {
    if(c=='s')
    func1();  // appropriate function
    else 
    func2();
    
    return 0;
    ...
    See more | Go to post

  • sircool
    replied to could you help about algorithm
    in C
    Thank you all for every valuable interpretations ...
    See more | Go to post

    Leave a comment:


  • sircool
    started a topic calculate the horse's movement
    in C

    calculate the horse's movement

    hi guys,
    the problemm is that you have a horse on the chess board.You should write a function that calculate the horse's movement.I mean how many movement later you can go every point on the board.I wrote that program and wanted to share with you...
    I am Turkish so I named functions in Turkish.So it can make the source misunderstable sorry for that

    //---------------------------------------------------------------------------...
    See more | Go to post

  • sircool
    replied to could you help about algorithm
    in C
    finally i managed to write that program thank to you.I will put that code here to help anyone who want to help about that problem.I wrote this problem for 3 *3 matris.It would be developed by using dynamic memory management

    Code:
    #include<stdio.h>
    #include<conio.h>
    void find(int,int);
    long result=0;
    int matris[3][3];
    int x,y;
    main()
    {
    int a,b;
    x=3;y=3;
    for(a=0;a<3;a++)
    ...
    See more | Go to post

    Leave a comment:


  • sircool
    replied to How to write for a loop?
    in C
    i add do while loop to your code
    getche() function takes a character that will ask users request if user types e it loops again otherwise program will end...
    i hope it was helpfull...
    See more | Go to post

    Leave a comment:


  • sircool
    replied to urgent plz help me to complete assingment
    in C
    if you select %e formatted that means you wanna print that floating point numbers format that save memory because of floating points.
    3.142857e+000 that output means there isn't any sliding point i mean that if there is written -01 after 'e' the real number would be occur when you slide the point one time to left the following example will make clear
    3.142857e+000=0 .3142857e-01
    if the operator is '+' you need slide the dot...
    See more | Go to post

    Leave a comment:


  • sircool
    replied to Help! Storing strings into arrays
    in C
    I wrote a programm that can help you i put the source if can't understand i will help you again

    Code:
    #include<stdio.h>
    #include<stdlib.h>
    #include<string.h>
    #define SIZE 120
    
    main()
    {
    int count=0;
    char name[SIZE];
    char *reversed;
    reversed=(char *)malloc(strlen(name)+1);
    printf("please type a name that will be reversed\n");
    ...
    See more | Go to post

    Leave a comment:


  • sircool
    replied to could you help about algorithm
    in C
    thanks for your attention.
    You realıy help me about which way i should focus on
    See more | Go to post

    Leave a comment:


  • sircool
    replied to need help to write a program
    in C
    karan is true i would help you about finding a integer from the 2D arrays
    you shold write 2 for loops and a if state like that

    int search;

    for(int i;i<size;i++)
    for(int j;j<size;j++)
    if(array[i][j]==search)
    return 0;

    can be......
    See more | Go to post

    Leave a comment:


  • sircool
    replied to could you help about algorithm
    in C
    yeah you are true i wrote wrong i am sorry for that
    actually i wanted to say we can go 2 or 4 from 1.But we can't go to 5 from 1 because it is diagonal way. The problem is that how many ways are there that go to 9.Starting point is 1. Sure we can't go same point on a way
    for instance the following one is false
    1236523 ( because we visit the 3 point twice so this one is false)

    if you help me again i would be...
    See more | Go to post

    Leave a comment:


  • sircool
    started a topic could you help about algorithm
    in C

    could you help about algorithm

    firstly hi,
    i am new in this site
    i have a problem to develop a algorithm about that


    problem is that we should write a problem that can calculate the counts of ways 1 to 9 but we can't use diagonal way for instance we can't go 5 from 1. we can go 2 or 5 from 1

    if you help me to develop a algorthm with c++ i would be happy

    thanks...
    See more | Go to post
No activity results to display
Show More
Working...