-
溫度華氏轉變攝氏
#include <stdio.h>
#include <stdlib.h>
enum x {A,B,C,D,E}
int main(void)
{
int a=73,b=85,c=66
{
if (a>=90)
printf("a=A等級!!\n")
else if (a>=80)
printf("73分=B等級!!\n")
else if (a>=70)
printf("73分=C等級!!\n")
else if (a>=60)
printf("73分=D等級!!\n")
else if (a<60)
printf("73分=E等級!!\n")
}
{
if (b>=90)
printf("b=A等級!!\n")
else if (b>=80)
printf("85分=B等級!!\n")
else if (b>=70)
printf("85分=C等級!!\n")
else if (b>=60)
printf("85分=D等級!!\n")
else if (b<60)
printf("85分=E等級!!\n")
}
{
if (c>=90)
printf("c=A等級!!\n")
else if (c>=80)
printf("66分=B等級!!\n")
else if (c>=70)
printf("66分=C等級!!\n")
else if (c>=60)
printf("66分=D等級!!\n")
else if (c<60)
printf("66分=E等級!!\n")
}
system("pause")
return 0
}
標簽:
include
stdlib
stdio
gt
上傳時間:
2013-12-12
上傳用戶:亞亞娟娟123
-
Problem B:Longest Ordered Subsequence
A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ..., aN) be any sequence (ai1, ai2, ..., aiK), where 1 <= i1 < i2 < ... < iK <= N. For example, sequence (1, 7, 3, 5, 9, 4, 8) has ordered subsequences, e. g., (1, 7), (3, 4, 8) and many others. All longest ordered subsequences are of length 4, e. g., (1, 3, 5, 8).
標簽:
Subsequence
sequence
Problem
Longest
上傳時間:
2016-12-08
上傳用戶:busterman
-
basic.c */
/**//* Project:NeuroBasic, basic package*//**/
/* Survey:This is a simple Basic b-code compiler which*/
/*can be used as a comfortable command shell for */
/* any program. The actual compiler is found in */
/*compiler.c.*/
/*The functions m_fctptr() and user_server()*/
/*build an interface to an
標簽:
basic
NeuroBasic
Project
package
上傳時間:
2017-02-15
上傳用戶:xymbian
-
Instead of finding the longest common
subsequence, let us try to determine the
length of the LCS.
Then tracking back to find the LCS.
Consider a1a2…am and b1b2…bn.
Case 1: am=bn. The LCS must contain am,
we have to find the LCS of a1a2…am-1 and
b1b2…bn-1.
Case 2: am≠bn. Wehave to find the LCS of
a1a2…am-1 and b1b2…bn, and a1a2…am and
b b b
b1b2…bn-1
Let A = a1 a2 … am and B = b1 b2 … bn
Let Li j denote the length of the longest i,g g
common subsequence of a1 a2 … ai and b1 b2
… bj.
Li,j = Li-1,j-1 + 1 if ai=bj
max{ L L } a≠b i-1,j, i,j-1 if ai≠j
L0,0 = L0,j = Li,0 = 0 for 1≤i≤m, 1≤j≤n.
標簽:
the
subsequence
determine
Instead
上傳時間:
2013-12-17
上傳用戶:evil
-
該程序用以查找任意兩個整數之間的所有素數。 Prime number finder can find all primes between a and b and will write the results to the file PRIMES.TXT
標簽:
and
between
number
finder
上傳時間:
2014-01-14
上傳用戶:cccole0605
-
設B是一個n×n棋盤,n=2k,(k=1,2,3,…)。用分治法設計一個算法,使得:用若干個L型條塊可以覆蓋住B的除一個特殊方格外的所有方格。其中,一個L型條塊可以覆蓋3個方格。且任意兩個L型條塊不能重疊覆蓋棋盤。
標簽:
上傳時間:
2013-12-19
上傳用戶:xc216
-
生成Trick文件工具
1.Open command line
2.input tricktest
Usage: TrickTest -f -o -i
-f source mpeg2 file to trick
-o trick output directory
-i output file id
-m max coding error, default 0
-b max bitrate for trick generate, default 0 mean no limit
-s trick buffer block size, must be n*188
-l log file, default c:\tricktest.log
example:
tricktest -f 黑鷹行動.mpg -o c:\temp -i A -m 1000 -b 3750000
soure file: 黑鷹行動.mpg
output directory: c:\temp
filename: 000000A,000000A.ff,000000A.fr,000000A.vvx
max coding error: 1000
trick generation speed: 3750000 bps
a
標簽:
TrickTest
tricktest
command
source
上傳時間:
2014-01-23
上傳用戶:水口鴻勝電器
-
function g=distance_classify(A,b)
距離判別法程序。
輸入已分類樣本A(元胞數組),輸入待分類樣本b
輸出待分類樣本b的類別g
注:一般還應計算回代誤差yita
輸入已知分類樣本的總類別數n 每類作為元胞數組的一列
標簽:
distance_classify
function
判別
分類
上傳時間:
2013-11-25
上傳用戶:yyyyyyyyyy
-
#include <stdlib.h>
#include<stdio.h>
#include <malloc.h>
#define stack_init_size 100
#define stackincrement 10
typedef struct sqstack
{
int *base;
int *top;
int stacksize;
} sqstack;
int StackInit(sqstack *s)
{
s->base=(int *)malloc(stack_init_size *sizeof(int));
if(!s->base)
return 0;
s->top=s->base;
s->stacksize=stack_init_size;
return 1;
}
int Push(sqstack *s,int e)
{
if(s->top-s->base>=s->stacksize)
{
s->base=(int *)realloc(s->base,(s->stacksize+stackincrement)*sizeof(int)); if(!s->base)
return 0;
s->top=s->base+s->stacksize;
s->stacksize+=stackincrement;
}
*(s->top++)=e;
return e;
}
int Pop(sqstack *s,int e)
{
if(s->top==s->base)
return 0;
e=*--s->top;
return e;
}
int stackempty(sqstack *s)
{
if(s->top==s->base)
{
return 1;
}
else
{
return 0;
}
}
int conversion(sqstack *s)
{
int n,e=0,flag=0;
printf("輸入要轉化的十進制數:\n");
scanf("%d",&n);
printf("要轉化為多少進制:\n"); scanf("%d",&flag);
printf("將十進制數%d 轉化為%d 進制是:\n",n,flag);
while(n)
{
Push(s,n%flag);
n=n/flag;
}
while(!stackempty(s))
{
e=Pop(s,e);
switch(e)
{
case 10: printf("A");
break;
case 11: printf("B");
break;
case 12: printf("C"); break;
case 13: printf("D"); break;
case 14: printf("E"); break;
case 15: printf("F"); break;
default: printf("%d",e); }
}
printf("\n");
return 0;
}
int main()
{
sqstack s;
StackInit(&s);
conversion(&s);
return 0;
}
標簽:
整數
棧
基本操作
十進制
轉化
進制
上傳時間:
2016-12-08
上傳用戶:愛你198
-
隨著光伏發電系統快速發展,以及電動汽車充電樁的普及,傳統的剩余電流保護器無法滿足實際需求。介紹了一款B型剩余電流保護器,采用磁調制剩余電流互感器和零序電流互感器采集剩余電流。根據GB/T 22794—2017標準要求,可識別1 kHz及以下的正弦交流、帶和不帶直流分量的脈動直流、平滑直流等剩余電流信號。經信號調理電路將電壓信號送到單片機進行采集和判斷。通過試驗測試,該樣機在測試精度和速度上均符合國家標準的相關要求。The rapid development of photovoltaic power generation systems and the popularity of electric vehicle charging piles make the traditional residual current protective devices unable to meet the actual demand.This paper proposed a type B residual current protective device,which uses the magnetically modulated residual current transformer and the zero sequence current transformer to acquire the residual current.According to the requirements of GB/T 22794—2017,the type B residual current protective device can detect sinusoidal AC residual current of 1kHz and below 1kHz,pulsating DC residual current with and without DC component,smooth DC residual current and so on.The signal processing circuit sends the voltage signal to the MCU for acquisition and judgment.Through experimental tests,the device meets the relevant requirements of national standards in terms of test accuracy and speed.
標簽:
電流保護器
上傳時間:
2022-03-27
上傳用戶: