Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Lap 4-1เงื่อนไข

+7 votes
asked Dec 23, 2024 by EME2R673323100217 (210 points)
#include <stdio.h>

int main(){

//ประกาศตัวแปรชนิดจำนวนเต็ม ชื่อ a
    int a;

//รับค่าจำนวนเต็มหนึ่งจำนวนเพื่อเก็บในตัวแปร a
    printf("Enter a : :");
    scanf("%d",&a);

//ให้นักศึกษาเขียนนิพจน์เพื่อตรวจสอบเงื่อนไขในวงเล็บของ if และเติมคำสั่งในวงเล็บปีกกาให้สมบูรณ์
  
    if( 10<=a && a <=100 && a%5==0)
   
    {printf("In condition");

   
  

    }else{printf("Out of condition");

    }

    return 0;
}

1 Answer

+1 vote
answered Dec 24, 2024 by emir (170 points)
#include <stdio.h> int main() { // Declare an integer variable named 'a' int a; // Prompt the user to enter an integer value printf("Bir sayi giriniz: "); scanf("%d", &a); // Check if the number is between 10 and 100 (inclusive) and divisible by 5 if (10 <= a && a <= 100 && a % 5 == 0) { // If the condition is true, print "Koşulda" (In condition) printf("Koşulda\n"); } else { // Otherwise, print "Koşul Dışı" (Out of condition) printf("Koşul Dışı\n"); } // Return 0 to indicate successful program termination return 0; }

Türkçe kısımları sil,satırlara ayır çalışır emin ol

Cevabımı seç

DOĞRUSU BU KARDEŞİM
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...