표현식의 값을 계산하는 C 언어

설명하다

a = 40이고 c = 212인 표현식 "(-8+22)×a-10+cnn2"를 평가해 보세요.

설명 입력:

없음.

출력 설명:

(-8+22)×a-10+cnn2 계산 결과는 정수입니다.

#include<stdio.h>
int main()
{
    int a=40;
    int b;
    int c=212;
    b=(-8+22)*a-10+c/2;
    printf("%d",b);
    return 0;
}

꿈이 있는 프로그래밍 초보자, 열심히 노력하세요!

추천

출처blog.csdn.net/whwwyshf/article/details/130020688