0% found this document useful (0 votes)
10 views50 pages

Printf ("Hello") //hello 9.: Return0

Uploaded by

skyyoon0924
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views50 pages

Printf ("Hello") //hello 9.: Return0

Uploaded by

skyyoon0924
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

mainc

1//CodeUp1001
2
3 #include<stdio.h>
4
5intmain()
6*-
7 printf("Hello");//Hello₴£9.
return0;//
10}
11
#1028. 1 2
[ ]
#includesstdio.hz
intmainl),

unsignedintn:
scanf("%ou",&en):
printf("%u",n):
}

[ ][[[] ]
int -2,147,483,648~2,147,483,647 ,unsignedint
0~4294967295 . 0~4294967295
unsignedint . '%u' .
1061. [ ] OR
:2 . -2147483648 ~ +2147483647
: (bitwise) or 10 .
: or .
|(or, vertical bar) .
| . or 1 1 .

3 5
3 : 00000000 00000000 00000000 00000011
5 : 00000000 00000000 00000000 00000101
3 | 5 : 00000000 00000000 00000000 00000111 .

1062. [ ] XOR
:2 . -2147483648 ~ +2147483647
: (bitwise) xor 10 .
: xor .
^(xor, circumflex/caret) . ^ 1 . 1
1 ,0 0 0 .

3 5
3 : 00000000 00000000 00000000 00000011
5 : 00000000 00000000 00000000 00000101
3 ^ 5 : 00000000 00000000 00000000 00000110 .
1063. [ ]
: . -2147483648 ~ +2147483647
: 10 .
: 3 ? .
3 3
" ?( ):( )” .
':' , ':'
.

123 > 456 ? 0 : 1


123 > 456 1 .

1064. [ ] 3
:3 . -2147483648 ~ +2147483648
: .
:3 ? .

(a>b ? a:b)>c ? (a>b ? a:b):c


a, b, c .
1065. [ / ] 3
: a, b, c . 0 ~ +2147483647 1 .
: .
: a, b, c , .
‘if ’ .
, a%2==0 a 2 0 ( / ) .
, if(a%2 == 0) “a ?” .

-1066
( )
5~6=
3 .

8~15= /
.
, /
2 ,
.

,
(\n)
.

17~24/26~33=
.
-1067
( )
4~5=
.
, -2147483648 ~
+2147483647
.

6~13= 0
/ .
(\n)
.

15~22= 2
0 /
.

-1068
( )
4~5= 0 100
.

6~21=

.
,

else~if
.
-1069
( )
4~5=
.

6~25=

.
, switch~case
.

-1069
6=a
8,11,14,17=a A,B,C,D
.
20= .
(break;=
.)
-1070
1 #includecstdio.h> ( )
2

3-1
intmain(void)
4~5=
4 inta; .
5 scanf("%d"‚da);
6 switch(a)
6~25=switch~case
8
9
case1:
case2:
.
10 case12: ,case break;
11 printf("winter");
12 break;
case
13
14
case3: switch~case
case4:
15 case5: .
16
printf("spring");
17 break;
18 Case6:
19 Case7:
20 case8:
21 printf("summer");
22 break;
23 default:
24 printf("fall");
25 7
26

(-2147483648 ~ 2147483647) ,
,0 .
, while( ), for( ), do~while( ) .

• goto
( : ) ,
goto ( ); .

4 : a
6 : “reload”
8 :a 0 end
10 : a 0 reload
11 : “end”
n ,
(-2147483648 ~ 2147483647) ,
.
, while( ), for( ), do~while( ) ,n
.

6 : n
10 : “again”
11 : cnt 0
13~14 : ,
15 : again

+) ( )-- : , 1
--( ): 1 ,

(-2147483648 ~ 2147483647) ,
.

While : while
If +

1. .
2. .
3. .
4. .

5 : a
7 :a 0
9~10 : a
(1~100) ,
1 1 .

5 : a
7 :a 0
9 :a
10 : a 1

(1~100) ,
1 0 .

5 : a
7 :a 0
9 :a 1
10 : a

9, 10
1076. 1

, ‘a’
.
char
a .

-> i ,

( : a=97, b=98, c=99, ...)

‘a’ : a .

1077. 1

,0 .

int
0 .

-> i ,
1078.
,

-> , sum

-> 0 , ,
(2 0 )
-> sum .

-> sum .

1079.

‘q’
#include<stdio.h> ‘q’ .

intmain(void)
{
charc;scanf("%c",8c); -> .
while(c!='g') -> q ,q .
{
printf("%c\n",c);-> q ,
scanf("%c",&c); -> while q
}
printf("%c",c) -> q q .
}
1080. ?
1+2+3+...+n
n .

-> .
-> sum i .
-> ,

-> (i) 1 .
-> (sum) .
1086. 16

•83 :
1#include<stdio.h>
2intmain()
3-1
4 inti,a;+
5 scanf("%d",&al);- = 0.
6 for(1=1;14=a;1++)=2 12 =2 A = 1 1
7- {
if(i==3||i==6||i==9)printf("X");=04¿=3012=60r2-9019'x'*%
9 elseprintf("%d",i);=0E2429
10 }
11 return0;
12
13}
1084:R,G,B
#include<stdio.h><
12 intmain()
3
4 inti,a,b,c,j,k,ent-0;
scanf("RdPadrad",Ba,&b,8c);2%2( ) (a,b,C) .
for(1=0;ka;ht)Ei=0 ;i 0 ; . i
{ 5 5) 5g4
fo(j=0
j<b
7++)
;
0 6 :J1
1 )
for(k=0;kec;Kt+)CF=0 ; 1 1 )
{
printf(*%d%d%din",i,j,k);+-i.J.K724.
cnttt;ecntecnttl=>cnt 1 ct

printf("Rd",cnt);- .
8 return0;
O

10
1086.
1090. 2
1094. 2
1098.

You might also like