User Profile

Collapse

Profile Sidebar

Collapse
hackr
hackr
Last Activity: Apr 19 '17, 01:23 PM
Joined: Apr 19 '17
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • 1) When both dimensions are available globally (either as a macro or as a global constant).

    Code:
    #include <stdio.h>
    const int M = 3;
    const int N = 3;
     
    void print(int arr[M][N])
    {
        int i, j;
        for (i = 0; i < M; i++)
          for (j = 0; j < N; j++)
            printf("%d ", arr[i][j]);
    }
     
    int main()
    {
        int arr[][N] = {{1, 2, 3}, {4,
    ...
    See more | Go to post
    Last edited by Niheel; Apr 19 '17, 03:34 PM. Reason: marketing link signature edited out. Please read guidelines.

    Leave a comment:


  • "print" treats the % as a special character you need to add, so it can know, that when you type "f", the number (result) that will be printed will be a floating point type, and the ".2" tells your "print" to print only the first 2 digits after the point.

    %.2f" % total
    % is a symbol for variable and is not a modulo!
    . and the number fallowing modifies how many digit decimal points...
    See more | Go to post
    Last edited by Niheel; Apr 19 '17, 03:37 PM. Reason: please don't link spam, you can add links to resources with addtional specific information, but not broad marketing type links.

    Leave a comment:


  • hackr
    replied to Ai chatbot using python
    For learning Python visit here https://hackr.io/tutorials/learn-python

    The boundaries of a bot
    When you begin work on a conversational UI, even a trivial one, you’ll need to answer these fundamental design questions:

    Domain knowledge: What does a user expect this bot to understand?
    Personality: What tone or vocabulary does the bot employ?
    Domain knowledge
    True artificial intelligence does not...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...