Write a program that reads three numbers and print their sum, product and average in C | STS

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 7

  • @codeandscience
    @codeandscience  Год назад

    SOURCE CODE HERE:
    // Write a program that reads three numbers and print their sum, product and average?
    // formula: sum = num1+num2+num3, product=num1*num2*num3, average=sum/3
    #include
    int main()
    {
    int num1, num2, num3, sum, product, average;

    printf("
    Enter first number: ");
    scanf("%d", &num1);

    printf("
    Enter second number: ");
    scanf("%d", &num2);

    printf("
    Enter third number: ");
    scanf("%d", &num3);

    sum = num1+num2+num3;
    product=num1*num2*num3;
    average=sum/3;

    printf("
    Sum of three numbers is: %d", sum);
    printf("
    Product of three numbers is: %d", product);
    printf("
    Average of three numbers is: %d", average);


    return 0;
    }

  • @Fancyface81
    @Fancyface81 Месяц назад

    Thankyou very much ..❤❤keep uploading the more lectures of computer programming class 10 end exercises and other conceptual programming Question ❤

    • @codeandscience
      @codeandscience  Месяц назад

      Thanks for your kind response. If you need help with any specific questions then email us. We will try to resolve your problems. Jazaqallah

  • @Arham-z4j
    @Arham-z4j Год назад +1

    Good work

  • @halalway6001
    @halalway6001 Год назад

    💖

    • @codeandscience
      @codeandscience  Год назад +1

      Thanks for your comment. keep supporting

    • @halalway6001
      @halalway6001 Год назад

      tomorrow is my paper and am currently watching ur videos@@codeandscience