Thread: Is this printf output for anything?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2023
    Posts
    2

    Is this printf output for anything?

    Hallo,
    I have this this example, but is this usefull in practical use?
    Normaly I would work with IF or CASE, but this version can only answer 0 or 1.
    But can I use it an put the result in a variable or something with this system?
    Orf write different text statements?


    Code:
    #include <stdio.h>
    #include <conio.h>
    int main(void){
        int temper = 20;
        printf("Ist kleiner als 23°C %d\n", temper < 23);
        printf("Ist größer als 23°C %d\n", temper  > 23);
        return 0;     
    }
    Last edited by Salem; 09-20-2023 at 04:18 AM. Reason: line wrapping

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. explain the output of printf
    By royroy in forum C++ Programming
    Replies: 1
    Last Post: 06-05-2015, 08:18 AM
  2. printf style output for C++
    By Mozza314 in forum C++ Programming
    Replies: 2
    Last Post: 11-09-2011, 12:31 AM
  3. Formatting output with printf
    By Sn0wcra5h in forum C Programming
    Replies: 1
    Last Post: 01-25-2010, 03:44 PM
  4. printf output
    By shyguy24x7 in forum C Programming
    Replies: 3
    Last Post: 01-31-2009, 02:01 PM
  5. Printf Output Confusion
    By simpleid in forum C++ Programming
    Replies: 2
    Last Post: 11-16-2006, 11:36 AM

Tags for this Thread