có 4 biến có giá trị sau : so1=4,so2=6,so3=9,a=2. giá trị a bằng bao nhiêu ở 2 đoạn code 1 và 2 . Chủ yếu vui là chính cho những người mới học C như e
1/
#include<stdio.h>
#include<conio.h>
void main()
{
int so1 = 4, so2 = 6, so3 = 9, a = 2;
{
if (so1 > 0)
{
if (so2 > so3)
a = so2;
}
else
a = so3;
}
printf("xuat so s:%d", a);
_getch();
}
2/
#include<stdio.h>
#include<conio.h>
void main()
{
int so1 = 4, so2 = 6, so3 = 9, a = 2;
{
if (so1 > 0)
if (so2 > so3)
a = so2;
else
a = so3;
}
printf("xuat so s:%d", a);
_getch();
}