" - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

"

Description:

????? ???/???, ??????, ????. ???? ????? ?????. ??? ?????, ??????, ???? ??????, ... ????-???????? ?? ???? ?? ???? ??????? ????? ????, ???? ?- www.mail.yahoo.com ... – PowerPoint PPT presentation

Number of Views:23
Avg rating:3.0/5.0
Slides: 58
Provided by: csta3
Category:
Tags: com | mail | mailyahoo | notepad | www | yahoo

less

Transcript and Presenter's Notes

Title: "


1
????? ?????? ????? ??? ???"?
????? ???
www.cs.tau.ac.il/armon/mehina.html
2
?????? - ????? ????? ??????
  • ???? ?????
  • ????? ???/???, ??????, ????.
  • ???? ????? ?????
  • ??? ?????, ??????, ???? ??????, ?????????.
  • ???? ???? C
  • ??? ?????, ???? ????? ?? ??????, ???????.

3
?????? ?????? ?????? ???? C
  • include ltstdio.hgt
  • int main()
  • printf(Hello World\n)
  • return 0

4
?????? ????? ???? ?????? ?????
  • include ltstdio.hgt
  • int main()
  • int seconds, hours, minutes
  • hours 24
  • minutes 60
  • seconds hours minutes 60
  • printf(Number of seconds is d\n, seconds)
  • return 0

5
????? ?????? ????
  • ??? ?? ????? ????? ???????
  • ????? ??????? ??????
  • ????? ?????
  • ???? ?????? ?- C
  • ???/??? ?? ??????
  • ?????? ?? ??????

6
??? ?? ????? ????? ???????
  • ????? ??? ????? ??????? ?? ????? ???? ???????
    ????, ???? ??????? ???? ?? ?????? ????????
    (?????, ???????, ????-????).
  • ?????? ??? ?? ???? ???? ???? ?? ??????, ??? ?????
    ???????.
  • ?? ????? ???? ????? ????? (file) ??????, ???????
    ?? ??.

7
??? ?? ????? ????? ???????
  • ??? ???? ?? ?????, ??????? ?? ??? ????? (??????
    ?? ??? ?? ?? ?????? ???????).
  • ??????? ????? ?? ????? ex1.c, main.exe,
    article.doc, prog.obj, ex1.cpp.
  • ???? ??????? ????? ???? ????? ???? ?? ???? ?????
    ????? ???? ??? ??????.

8
??? ?? ????? ????? ???????
  • ?????? ?????? ??????
  • c ???? ????? ?????? C.
  • exe ?? com ???? ????? ????? ("???? ????").
  • obj ???? ????? ????-?????.
  • doc ???? WORD.
  • html ?? htm ?? ???????.
  • xls ???? Excel.
  • ppt ???? Powerpoint.
  • txt ???? ???? ?? notepad.

9
??? ?? ????? ????? ???????
  • ????? ????? ?? ?????? ??????? ( ?????? ???????
    folders ?? directories) ???-??????.
  • ?? ???? "??" ?? "???????" ?? ??????.
  • ?????? ?? ????? (?- path ???) ???? ?? ??????? ???
    ?????? ????? ??? ????? ????, ????
  • C\WINDOWS\TEMP\BACKUP.DOC

????
10
??? ?? ????? ????? ???????
  • ??????? ???? ???? ?????? ???? ??????
    C\WINDOWS\DESKTOP
  • ???? ????? ??? ?????? ?????? ?? ????? ?? ????? ??
    ??????.
  • ???? ????? ?????? ????? ?????? file (??????? new)

11
??? ?? ????? ????? ???????
  • ???? ????? ???? ?? ????? ??????? ?????? ????? ??
    ?????? ????? ?? ????? ?????? ?- rename.
  • ???? ????? ????? ????? ??????? find ?????? start.

12
??? ?? ????? ????? ???????
  • ????? ??- path ??? ?????? ????? ?? ?????
    ????????, ??? ????? ????? ?? ????? ??????? ??????
    ????? ??????? ??????? ????? ?? ??? ???? (???
    ????? ?????? ????).
  • ?? ?? ????? ????? ?? ?????, ?????? ???? ??????
    ????? ?? ???? ?????? (??? ???? ????? ???? ??? ???
    ????? ???????).

13
??? ?? ????? ????? ???????
  • ???? ?? ??????? ??????? ??????? ???? ????????
    ?????? ?? ?????? ????
  • armon_at_post.tau.ac.il
  • www.cs.tau.ac.il/armon/mehina.html

?? ?????? ???? ????? ????-???????? ?? ???? ??
???? ??????? ????? ????, ???? ?-
www.mail.yahoo.com
14
??? ?? ????? ????? ???????
  • ????? ???????
  • ??????
  • path
  • find
  • ??????

15
????? ??????? ??????
  • ??? ?????
  • ????? ?????? ????? ????? ?????
  • ???? ?????? ???? C
  • ????? ?????? ?? ???? ?????? (???/???)
  • ?????? ????? ???? ?? ??????

16
??????? ?????? ????
  • include ltstdio.hgt
  • int main()
  • int seconds, hours, minutes
  • hours 24
  • minutes 60
  • seconds hours minutes 60
  • printf(Number of seconds is d\n, seconds)
  • return 0

17
????? ??????? ??????
  • ???????? ???? ???? ????? ???? ??????? ?????
    ??????.
  • ?????? ??????? ???? ??????? ???? ??????? ??
    ??????? ?????? ???????, ?????? ???? ?????? ?????
    ???? ????? ???????.
  • ????? ?? ???? ?????? ??????? ???? ???? ???????,
    ???? ??? ??, ?? ????? ??????? ????? ?????.
  • ????? ?? ????? ?? ??? ????? ?????? (???? ??'
    ???/??' ????/???) ?? ??? ??? ???? ??? ?????? ????.

18
??? ??????
  • ???? ??????? ????? ??, ????? ????? ?? ????? ????
    ?????? (??????/?????/??????) ?????? ???? ?? ????
    ??????? ??.
  • ??? ?????? ??????, ???? ????? ????, ????? ?????
    ?? ??? ??? ??? ?????? ???? ?????.
  • - ?????? ?? ?????? ?????? ??????? ???????.

19
??????? ?????? ????
  • include ltstdio.hgt
  • int main()
  • int seconds, hours, minutes
  • hours 24
  • minutes 60
  • seconds hours minutes 60
  • printf(Number of seconds is d\n, seconds)
  • return 0

????? ???? ??????? ?????
???? ????? ??????? ??????? ?????
20
????? ??????
  • ?????? ??????? ??????? ???? ???? ????? ???????
    ???????? , ????? ??? ???????.
  • ????? ????? ????? ?? ????? ?????? ??? ???. ????
    ?? ????? ???????? ?????? ????? ?????.
  • ????????? ????? ???? ????? ?? ???? ????? ?????,
    ????? ???? ?? ??? ??? ?????? ??.
  • ???? ???? ???? ??? ?????? ????? ?????? (?????
    ?????).

21
??????? ?????? ????
  • include ltstdio.hgt
  • int main()
  • int seconds, hours, minutes
  • hours 24
  • minutes 60
  • seconds hours minutes 60
  • printf(Number of seconds is d\n, seconds)
  • return 0

????? ???? ??????? ?????
???? ????? ??????? ??????? ?????
22
?????? ?????? ????? - ??????
seconds
minutes
hours
????? ??????? ???? ????? ???????
23
?? ??? ?????? ??????
  • include ltstdio.hgt
  • int main()
  • int seconds, hours24, minutes60
  • seconds hours minutes 60
  • printf(Number of seconds is d\n, seconds)
  • return 0

24
?????? ?????? ????? - ??????
seconds
minutes
hours
24
60
????? ??????? ???? ????? ??????? ?? ??? ??????
25
????? ?????? ??????? ???????
  • int ???? ??? (????? ?????? ??? ??? 231- ????
    231).
  • float ???? ???? (????? ??? ???? ?? 1038 , ????
    ??? ??? ????? ????? ??? ???? 38-10). ???? ?? 6
    ?????.
  • double - ???? ???? (????? ????? ???? ???????).
    ????? ??? ???? ?? 10308. ???? ??? ??? ?????
    ????? ??? ???? 308-10. ???? ?? 15 ?????.
  • char ?? ???? (???? a).
  • - ????? ?????? ??????? ??? ???? ??????
    ???????????.

26
??????? ??????? ??????
  • char c
  • int i
  • float the_max_percent
  • double average
  • ????? ?? ???? ??? ??????
  • char cA
  • int sum0

??? A' ????? ?????? ??? c
27
????? ?????? ???? ??????
  • ?? ????? ???? ????? ?????? ???????, ?????, ???
    ?????.
  • ??? ?????? ??? ?? ???? ????? ?????.
  • ?? ???? ??? ??? ????? ???? ???? (case-sensitive).
    ????? a ?- A ?? ???? ?????.
  • Counter, new_sum, total1.
  • percent , 2counter, new-sum.
  • ???? ???? ???? ??? ??????? ???? ???? ??????.

????
????
28
??? ?? ??? ??? ?????? ???????
  • ??????? ??????? ?????? ???? ???? ??????? ??????,
    ???? ??? ????? ????.
  • ????? ???? ???? ??????? ?????? ?????. ???? ?????
    ?????? ?????? ????? ?????? ???? ???? (?????? ???
    ????? ????? ??? ???? ???? ??????).
  • ???? ??? ?????????? ???? ?????? ???????.
  • - ????? ??????? ??????? ???? ???? ?? ?????
    ?????? ??? ???? ?????? ?? ???? ?????? ?? ??????.
    ????????? ???? ???????? ?????? ?????? ???????
    ???? ????? ?????? ??????.

29
????? ??????
  • ??????
  • ???????
  • ????
  • ??????

30
??? (?????) ?? ???? ??????
  • ????? ?? ???????? printf ??????? ????? ?? ???
    ?????? ????. ????
  • printf(The sum
    is d, sum)
  • ?????? d ????? ???? ????? ???? ?? ?????, ??????
    ???? ?????? ????? ??????? (d ????? ?-int).
  • ?? ?????? ?????? ??? ????? ???? ???????, ?????
    ?????.
  • ??? ??? ????? ?? ????? ????? ???, ?????? ???? ???.

31
?????? ????? ??????
  • d int (????? 10 ?????)
  • char - c
  • float, double - f (???? ?? ????? ??????? 21.54)
  • g (??? ????? ????
    ?????)
  • ??? ?????? ?? ????? , ????? printf()

32
??? ?? ??? ?????? ??????
  • include ltstdio.hgt
  • int main()
  •    double a,b,c   a 2.51   b 2   c
    ab   printf("The product is g\n", c)  
    return 0
  • ???? 5.02 The product is

33
????? ??? ?????? ????? ?????
  • include ltstdio.hgt
  • int main()
  •    double a,b,c   a 2.51   b 2   c
    ab   printf(g g g\n", a,b,c)  
    return 0
  • ???? 5.022.51 2

34
?????? ?????? ?????? ??????
  • include ltstdio.hgt
  • int main()
  •    double a,b   a 2.51   b 2  
    printf(g g g\n", a,b,ab)   return 0
  • ???? 5.022.51 2

35
char ????? ?? ??????
  • ?? char (??) ???? ??????? ????? ?????.
  • ?? ????????? ???? ?? 256 ????? ??????? (????
    ASCII). ??? ????? ??, ??? ???? ??????? ?? ?????
    ??????? ?? ??? ??? ?????.
  • ?? ?? ???? ??? ("???") ????.
  • ???? ??????? A-Z ?????? ??? ???? ??????? 65-90,
  • ??????? a-z ??? ???? ??????? 97-122, ???????
    ??? ???? ??????? 48-57 ?????.
  • char cA ?????? ?"? ????????? ?- char c65

36
????? ??????? - ?????
????? ?????? ???? ?? ?????? ??? ?? ?????
  • includeltstdio.hgt
  • int main()
  • char i A'
  • printf(i as a character is c\n", i)
  • printf("i as an integer is d\n", i)
  • return 0

?? ??? char i65
i as a character is A
i as a number is 65
37
char ????? ?? ??????
  • ????? ??????? ?? ????? ??????, ???? ?? ?????
    ????? ?????? ?????.
  • ???? a1 ?? b.
  • 81 ?? '9'.
  • ????? ???? ???.

38
????? ??????? - ?????
  • includeltstdio.hgt
  • int main()
  • char i A'
  • printf(i as a character is c\n", i)
  • printf("i as an integer is d\n", i)
  • printf("The character after c is c\n", i,
    i1)
  • return 0

?? ??? char i65
i as a character is A
i as a number is 65
The character after A is B
39
????? ??????? - ??? ???????
  • i as a character is A
  • i as an integer is 65
  • The character after A is B

40
??? ?? ??????
  • ?????? ???
  • ????? ???????
  • ??????

41
??? ?? ???? ??????
  • ??"? ????? ???????? ????? ?? ??? ?????? ??????.
  • ????? ???????? printf, ????? ???????? scanf
    ?????? ??? ??????? ???? ?????. ???? ??? ?? ???
    ?????
  • scanf(d g,
    student_num, average)
  • ????? ????? ????, ?????? ???? ?????? ??????.
  • ?????? ???? ???? ??????? ?????? ?- printf, ????
    ?? ??- double ???? ????? lf

42
????? ???? ?? ?????? ?????
  • include ltstdio.hgt
  • int main()
  • int a, b, sum
  • printf(Enter an integer\n)
  • scanf(d, a)
  • printf(Enter an integer\n)
  • scanf(d, b)
  • sum a b
  • printf(Answer d d d\n, a, b, sum)
  • return 0

43
???? ???????
  • Enter an integer
  • 5
  • Enter an integer
  • 7
  • Answer 5 7 12

44
????? ???? - ????? ???????
a
b
sum
????? ??????? ???? ????? ???????
45
????? ???? ????? ???????
a
b
sum
5
????? ??????? ???? scanf(d, a)
46
????? ???? ????? ???????
a
b
sum
5
7
????? ??????? ???? scanf(d, b)
47
????? ???? ????? ???????
a
b
sum
5
7
12
????? ??????? ???? sum a b
48
???/??? ?? ??????
  • ????? ???????

49
?????? ?????? ?? ??????
  • ?????? ?? "????????? ?????????"
  • ??????? ()
  • ????
  • ?????
  • ?????
  • ???
  • ????? /
  • ?????? (?????)
  • ?????? ?? ?????? ?????? ?? ?????? ?????.
  • ???? 1 72 2 83.
  • ??? ??????? ??? ??? ?????? ????????.

50
????? ????? ???????? ???????
  • include ltstdio.hgt
  • int main()
  • double cels, fahr
  • printf("Please enter a fahrenheit
    temperature\n")
  • scanf("lf",fahr)
  • cels 5(fahr-32)/9
  • printf("This is equal to g degrees celsius\n",
    cels)
  • return 0

????? ???????
????? ??? ??????
????? ??????
51
?????? ?????? ??????-??
  • ?????? ?????? ????? ????? ???? ??? ??????
  • 37/2
  • ?? ????? ????? ?? ?????? ?????? ?????, ????? ????
    ?? ???? ???? ??? ?? ????/???? ???? ???? ???????.
    ???? 3.57/2.0
  • ?? ????? ?????? ??? ???? ?????? ???????? ???,
    ???? ????? ????? (overflow). ??? ???????? ??
    ?????? ?????? ?????? ?? ?????? ?- double.

52
  • ?????
  • ?????
  • ????? ??????
  • ?????? ?????? ??????? ???? C
  • ??? ???? ?? ??????
  • ????? ?????? ?? ??????

53
????? ???????
  • ????? ?????? ????? ???

54
1) ????? ?????? ?????? ???? ???? ?????????? ?????
????????, ??????? ???? ?? ????? ??????.
  • ????? ?????? ?????? ????

55
????? ????? ??????-????? ??????
  • include ltstdio.hgt
  • int main()
  • double weight, price, total
  • printf(Enter the weight in kilos\n)
  • scanf(lf, weight)
  • printf(Enter the price for a kilo\n)
  • scanf(lf, price)
  • total weightprice
  • printf(The total price is g\n, total)
  • return 0

56
2) ????? ?????? ?????? ???? ???? ???, ??????
1 ?? ??? ????, ??????? 0 ?? ??? ??-????.
  • ????? ?????? ?????? ????

57
????? ????? ?????? ????? ????
  • include ltstdio.hgt
  • int main()
  • int a
  • printf(Enter an integer for checking
    parity\n)
  • scanf(d, a)
  • printf(If it is even, 1 will be printed
    otherwise 0 \n)
  • printf(d\n, 1 - (a2) )
  • return 0
Write a Comment
User Comments (0)
About PowerShow.com