datasheetbank_Logo
전자부품 반도체 검색엔진( 무료 PDF 다운로드 ) - 데이터시트뱅크

ST20-SWC/PC 데이터 시트보기 (PDF) - STMicroelectronics

부품명
상세내역
제조사
ST20-SWC/PC
ST-Microelectronics
STMicroelectronics 
ST20-SWC/PC Datasheet PDF : 21 Pages
First Prev 11 12 13 14 15 16 17 18 19 20
ST20–SWC
|
/*
|
* compute factorial
|
*
|
*/
|
|int factorial(int n)
96
|{
| if (n > 0)
74
| return ( n * factorial(n–1));
| else
22
| return (1);
|
|}
|
|int main()
1
|{
| Channel *in, *out;
| int going = TRUE;
|
| in = get_param(1);
| out = get_param(2);
|
| while (going)
27
|{
|
int n, tag;
|
|
tag = read_chan (in, &n);
|
switch (tag)
|
{
|
case DATA: {
22
|
send_data (out, factorial(n));
|
break;
|
}
|
case NEXT: { /* start a new sequence */
4
|
send_next (out);
|
break;
|
}
|
case END: { /* terminate */
1
|
going = FALSE;
|
send_end (out);
|
}
|
}
|
}
|}
|}
|
######################
# Summary of results #
######################
Source file
: facs.c
Number of runs : 1
Processors
: All
>From linked unit : facs.lku
Top 10 Blocks!!
Line 25 – 96 times
Line 27 – 74 times
Line 42 – 27 times
Line 29 – 22 times
Line 49 – 22 times
Line 53 – 4 times
Line 34 – 1 time
Line 57 – 1 time
Total number of basic blocks 8
Basic blocks not executed 0
Coverage 100%
16/21

Share Link: 

datasheetbank.com [ Privacy Policy ] [ Request Datasheet ] [ Contact Us ]