פורסם 2014 במאי 1011 שנים למה הביטוי ללא הסוגריים נחשב כאמת?.והביטוי ללא סוגריים נחשב כשקר?ולמה יש לי שגיאת קומפילציה שאני מריץ את הקוד ב-vs?#include <stdio.h> /* Initialize variables. Note that c is not less than d, */ /* which is one of the conditions to test for. */ /* Therefore, the entire expression should evaluate as false.*/ int a = 5, b = 6, c = 5, d = 1; int x; int main() { /* Evaluate the expression without parentheses */ x = a < b || a < c && c < d; printf("\nWithout parentheses the expression evaluates as %d", x); /* Evaluate the expression with parentheses */ x = (a < b || a < c) && c < d; printf("\nWith parentheses the expression evaluates as %d\n", x); return 0; }Without parentheses the expression evaluates as 1With parentheses the expression evaluates as 0 נערך 2014 במאי 1011 שנים על-ידי eliom
פורסם 2014 במאי 1011 שנים true || false && falsetrue || falsetruetrue || false) && false)true && falsefalsehttp://www.swansontec.com/sopc.html
פורסם 2014 במאי 1011 שנים מחבר למה זה ככה:5*5+5=30וזה ככה:(5+5)*5=50תציב במשתנים ותבדוק.איפה יש אופרטור כפול וחיבור בקוד שהבאתי?
פורסם 2014 במאי 1011 שנים אתה זוכר שלמדת בכיתה ב סדר פעולות? אז זהו שיש סדר פעולות לכל הפעולות (אופרטורים ) ולא רק פעולות חשבון .
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.