Yeni başlayanlar için C program kodları 2 (C program codes for beginners) En büyük sayıyı buluyor. (Code finds the largest number.)


Girdiğimiz sayıların arasından en büyüğünü seçen uygulama;

(The sample that chooses the largest ( max ) number among the numbers we have entered)

Stdio genel kütüphanesi dışında hiçbir kütüphane içermeyen, istediğiniz kadar sayı yazabileceğiniz örnek bir programdır.This is a sample program that does not contain any library other than its general library(Stdio) and you can write as many numbers as you want.😊



#include < stdio.h >

    int main(void) 

{

        int num1, num2, num3, max;

        scanf("%d%d%d", &num1, &num2, &num3);

        max = num1;

        if (num2 > max) {

            max = num2;

        }

        if (num3 > max) {

            max = num3;

        }

        printf("(%d %d %d)  max = %d", num1, num2, num3, max);

        return 0;

    }

Yorumlar