herrDeng網內搜尋
自訂搜尋
Ads
訂閱:
張貼留言 (Atom)
熱門文章
-
教育部為提昇全民資安素養與電腦防護能力,本部於101年9月5日至11月5日舉辦「全民資安素養自我評量」活動,請在活動期間內踴躍上網檢測資訊安全素養認知程度,並有機會參與抽獎,詳情請參閱活動網站(網址: https://isafe.moe.edu.tw/event
-
先說明一下這是後知後覺的解答,所謂後知就是股票價格已知存在陣列(清單),當然就要用迴圈練習,雙迴圈暴力解需時O(n**2),當然不用,採python單一迴圈解答「最佳股票的買賣時機#LeetCode 121 Best Time to Buy and Sell Stock」,解...
-
url="https://www.twse.com.tw/exchangeReport/STOCK_DAY?response=json&date=20220330&stockNo=2330"
-
你會用C的算子sizeof?
-
Python CPP heap priority queue速解L eetcode 2530. Maximal Score After Applying K Operations heap/priority queue是重要的資料結構,無論是C++的std::priority_q...
-
C++ DP動態規劃解Leetcode 937 Maximum Number of Points with Cost 有些標示medium要比標示hard的問題還要難,Leetcode 1937. Maximum Number of Points with Cost,DP動態規...
133 則留言:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={94,65,64,75,77,63,64,80,80,89,73};
int s[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for (i=0; i<11; i++)
sum += t[i]*s[i];
average= (float)sum /22;
cout<<"加權平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={83,71,74,80,72,67,79,75,82,73,78};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average = (float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
int s[11]={92,72,88,74,74,77,86,78,75,89,74};
int c[11]={2,3,2,3,3,3,3,3,0,0,0};
int sum = 0;
float average;
int i;
for(i=0;i<11;i++)
sum =sum+s[i]*c[i];
average=(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {79,75,80,75,84,77,94,85,85,84,73};
int s[11] = {2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*s[i];
average = (float)sum/22;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
加權平均:82.6364
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={99,83,90,75,86,73,72,87,83,89,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum += t[i]*c[i];
average=(float)sum/22;
cout<<"加權:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={56,73,60,75,66,60,65,62,52,66,64};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[11]={81,65,67,75,74,67,60,78,72,70,63};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system ("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={74,65,79,75,74,64,94,79,79,85,67};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for(i=0;i<11;i++)
x=x+c[i];
y=(float)sum/x;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={72,67,54,75,73,62,60,74,70,80,75};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
printf("學分:%d\n",ctotal);
printf("平均:%5.2f",average);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={70,69,72,75,66,67,60,72,74,89,72};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
printf("學分:%d\n",ctotal);
printf("平均:%5.2f",average);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={70,69,72,75,66,67,60,72,74,89,72};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
printf("學分:%d\n",ctotal);
printf("平均:%5.2f",average);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = { 79,83,68,65,71,60,40,61,60,79,61 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum =sum+ t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={68,87,77,75,72,68,80,76,73,69,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=10 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = { 75,82,74,65,69,60,60,82,53,81,61 };
int c[11] = {2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={80,73,75,75,69,66,85,66,70,70};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=10 ; i++)
{
sum=sum+t[i]*c[i];
{
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
system ("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={80,63,71,75,56,60,60,75,73,75,85};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {71,56,55,85,70,43,60,68,67,80,70};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={64,63,60,75,67,71,65,80,77,87,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf ("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system ("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int a[11]={76,70,70,75,71,77,85,64,77,85,82};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<11;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<11;i++)
{
ctotal+=b[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={92,84,71,75,77,68,86,84,79,84,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf ("加權平均值=\%5.2f\n學分數=%d\n",average,ctotal);
system ("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {56,63,63,80,66,60,62,79,80,81,71};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
average = sum / 22.;
cout<<"學期總分:"<<sum<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
學期總分:1468
加權平均:66.7273
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 56,51,61,85,63,43,65,56,60,69,74 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("PAUSE");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={82,64,79,82,76,60,60,70,81,28,51};
int c[11]={0,1,2,2,3,3,3,3,0,2,3};
for(i=0;i<=11;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=11;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n",average,ctotal);
system("pause");
return 0;
}
#include<iostream>
#include<cstdlib>
using namespace std;
int main ()
{
int t[11]={80,65,60,80,71,68,72,63,64,80,70};
int c[11]={2,0,3,3,3,3,3,0,0,2};
int sum=0;
float average;
int i;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
average=(float)sum/22;
cout <<"總分:"<<sum<<endl;
cout <<"平均:"<<average<<endl;
system("pause");
return 0 ;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[11]={84,79,68,75,70,60,60,69,63,62,65};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<=10;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<=10;i++)
{
ctotal+=b[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[10]={87,81,89,76,62,76,79,62,79,87};
int c[10]={1,2,2,3,3,3,3,3,3,0};
int sum=0;
int ctotal=0;
float average;
int i;
for(i=0;i<=9;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=9;i++)
{
ctotal=ctotal+c[i];
}
average=(float)sum/ctotal;
printf("總分:%d\n",sum);
printf("平均:%f\n",average);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[11]={69,81,80,61,90,62,74,73,78,80,89};
int c[11]={1,2,2,2,3,3,3,3,3,3,0};
int sum=0;
int ctotal=0;
float average;
int i;
for(i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=10;i++)
{
ctotal=ctotal+c[i];
}
average=(float)sum/ctotal;
printf("總分:%d\n",sum);
printf("平均:%f\n",average);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={77,81,67,75,76,65,96,76,70,66,67};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=\%5.2f\n學分數=%d\n",average,ctotal);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={80,62 ,65,80,84,60,60,75,80,72.72};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float avreage;
for(i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
avreage=(float)sum/ctotal;
printf("學分:%d\n", ctotal);
printf("平均:%5.2f", avreage);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 50,74,72,75,70,46,60,66,69,76,64 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 41,57,57,75,71,60,60,70,60,65,64 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = { 56,61,55,80,70,60,61,70,76,60,68 };
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum = sum+t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 41,57,57,75,71,60,60,70,60,65,64 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 41,57,57,75,71,60,60,70,60,65,64 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("PAUSE");
return 0;
}
#include <st>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {50,36,34,75,67,27,60,54,21,55,60};
int sum = 0;
float average;
int i;
for (i=0;i<10;i++)
sum += t[i];
average = (float)sum / 10;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
/* 儲存各次成績的陣列 */
int t[11] = { 41,57,57,75,71,60,60,70,60,65,64 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("PAUSE");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={78,77,79,85,72,64,60,67,81,81,76};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float avreage;
for(i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
avreage=(float)sum/ctotal;
printf("學分:%d\n", ctotal);
printf("平均:%5.2f", avreage);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = { 53,67,74,75,71,60,71,67,70,73,69};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum = sum+t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
void test(void);
int main(){
test();
int a[6]={67,60,62,60,43,60};
int b[1]={60};
int c[2]={82,63};
int d[1]={85};
int sum=0;
int s,i;
s=0;
for(i=0;i<6;i++)
s=s+a[i]*3;
int S,I;
S=0;
for(I=0;I<1;I++)
S=S+b[I]*2;
int z,p;
z=0;
for(p=0;p<2;p++)
z=z+c[p]*1;
int Z,P;
Z=0;
for(P=0;P<1;P++)
Z=Z+d[P]*0;
double A;
sum=s+S+z+Z;
A=(float)sum/(6*3+1*2+2*1+1*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[10][40]={
"必修 GE0103A 中國通史 2 60",
"必修 IM0017 系統分析與設計 3 67",
"必修 IM0021 資料庫管理系統 3 60",
"必修 IM0022 資訊管理實務專題(一) 1 82",
"必修 IM0039 資訊管理講座(一) 1 63",
"必修 IM0044 會計學(一) 3 62",
"必修 IM0059 網頁程式設計 3 60",
"必修 IM0095 資訊網路安全 3 43",
"必修 PE0Z0L 體育(體適能) 0 85",
"選修 MD0030 經濟學(一) 3 60" ,
};
for (int i=0;i<10;i++)
cout<<i<<"\t"<<a[i]<<endl;
}
#include <iostream>
#include <cstdlib>
using namespace std;
void test(void);
int main(){
test();
int a[6]={64,85,75,64,92,37};
int b[1]={60};
int c[2]={82,62};
int d[1]={86};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*1;
int k,l;
k=0;
for(l=0;l<1;l++)
k=k+d[l]*0;
float A;
sum=e+g+i+k;
A=(float)sum/(6*3+1*2+2*1+1*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[10][60]={
"選修 GE3ZA033 甲 科技與人文[科技] 2 60 " ,
"必修 IM0017 乙 系統分析與設計 3 64 ",
"必修 IM0021 乙 資料庫管理系統 3 85 ",
"必修 IM0022 乙 資訊管理實務專題(一) 1 82" ,
"必修 IM0039 乙 資訊管理講座(一) 1 62 ",
"必修 IM0041 乙 計算機概論 3 75 ",
"必修 IM0059 乙 網頁程式設計 3 64 " ,
"選修 IM0069 甲 顧客關係管理 3 92 ",
"必修 IM0095 乙 資訊網路安全 3 37 ",
"必修 PE0Z0L 甲 體育(體適能) 0 86 ",
};
for (int i=0;i<10;i++)
cout<<a[i]<<endl;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[11]={44,76,63,75,60,38,40,55,60,55,60};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<=10;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<=10;i++)
{
ctotal+=b[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={39,57,53,75,56,36,40,48,53,57,65};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={65,84,64,65,75,70};
int b[2]={83,72};
int c[3]={75,75,86};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
double A;
sum=e+g+i;
A=sum/(6*3+2*2+3*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 83 ",
"必修 GE0102A 丙 英文 3 65 ",
"必修 GE0103A 丙 中國通史 2 72 ",
"必修 GE0105A 丙 勞作教育 0 75 ",
"必修 IM0004 丙 管理學 3 84 ",
"必修 IM0041 丙 計算機概論 3 64 ",
"必修 IM0042 丙 微積分(一) 3 60 ",
"必修 IM0043 丙 經濟學(一) 3 75 ",
"必修 IM0044 丙 會計學(一) 3 70 ",
"必修 ML01AA 丙 軍訓 0 75 ",
"必修 PE01AA 丙 體育(大一) 0 86 ",
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={64,72,63,89,68,71};
int b[2]={83,81};
int c[3]={75,76,71};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
double A;
sum=e+g+i;
A=sum/(6*3+2*2+3*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 83",
"必修 GE0102A 丙 英文 3 64",
"必修 GE0103A 丙 中國通史 2 81" ,
"必修 GE0105A 丙 勞作教育 0 75" ,
"必修 IM0004 丙 管理學 3 72 " ,
"必修 IM0041 丙 計算機概論 3 63" ,
"必修 IM0042 丙 微積分(一) 3 89" ,
"必修 IM0043 丙 經濟學(一) 3 68 " ,
"必修 IM0044 丙 會計學(一) 3 71 " ,
"必修 ML01AA 丙 軍訓 0 76 " ,
"必修 PE01AA 丙 體育(大一) 0 71 " ,
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[11]={39,57,53,75,56,36,40,48,53,57,65};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<=10;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<=10;i++)
{
ctotal+=b[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {56,63,63,80,66,60,62,79,80,81,71};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
cout<<"學分:"<<ctotal<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
必修 GE0101A 丙 國文 2 83
必修 GE0102A 丙 英文 3 64
必修 GE0103A 丙 中國通史 2 81
必修 GE0105A 丙 勞作教育 0 75
必修 IM0004 丙 管理學 3 72
必修 IM0041 丙 計算機概論 3 63
必修 IM0042 丙 微積分(一) 3 89
必修 IM0043 丙 經濟學(一) 3 68
必修 IM0044 丙 會計學(一) 3 71
必修 ML01AA 丙 軍訓 0 76
必修 PE01AA 丙 體育(大一) 0 71
學期加權平均=65.00請按任意鍵繼續 . . .
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={60,56,60,60,67,75};
int b[2]={63,60};
int c[3]={75,67,70};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
float A;
sum=e+g+i;
A=sum/(6*3+1*2+2*0);
printf("學期加權平均=%.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 63 " ,
"必修 GE0102A 丙 英文 3 60 " ,
"必修 GE0103A 丙 中國通史 2 60 " ,
"必修 GE0105A 丙 勞作教育 0 75 " ,
"必修 IM0004 丙 管理學 3 56 " ,
"必修 IM0041 丙 計算機概論 3 60 " ,
"必修 IM0042 丙 微積分(一) 3 60 " ,
"必修 IM0043 丙 經濟學(一) 3 67 " ,
"必修 IM0044 丙 會計學(一) 3 75 " ,
"必修 ML01AA 丙 軍訓 0 67 " ,
"必修 PE01AA 丙 體育(大一) 0 70 " ,
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
必修 GE0101A 丙 國文 2 63
必修 GE0102A 丙 英文 3 60
必修 GE0103A 丙 中國通史 2 60
必修 GE0105A 丙 勞作教育 0 75
必修 IM0004 丙 管理學 3 56
必修 IM0041 丙 計算機概論 3 60
必修 IM0042 丙 微積分(一) 3 60
必修 IM0043 丙 經濟學(一) 3 67
必修 IM0044 丙 會計學(一) 3 75
必修 ML01AA 丙 軍訓 0 67
必修 PE01AA 丙 體育(大一) 0 70
學期加權平均=63.00請按任意鍵繼續 . . .
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[10]={82,74,66,74,69,60,36,60,65,90};
int c[10]={0,1,2,2,3,3,3,3,3,0};
for(i=0;i<9;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<9;i++)
{
ctotal=ctotal+c[i];
}
average=(float)sum/ctotal;
printf("加權平均數=%5.2f\n學分數=%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={59.82,32,34,66,70};
int b[2]={70,59};
int c[3]={82,62};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*1;
double A=0.0;
sum=e+g+i;
A=sum/(6*3+2*2+2*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[12][80]={
"必修 GE0101A 丙 國文 2 70 " ,
"必修 GE0102A 丙 英文 3 59 ",
"必修 GE0103A 丙 中國通史 2 59 ",
"必修 IM0004 丙 管理學 3 82" ,
"必修 IM0041 丙 計算機概論 3 32 ",
"必修 IM0042 丙 微積分(一) 3 34 " ,
"必修 IM0043 丙 經濟學(一) 3 66 ",
"必修 IM0044 丙 會計學(一) 3 70 ",
"必修 PE01AA 丙 體育(大一) 0 82 ",
"必修 ML01AA 丙 軍訓 0 62 ",
};
for (int i=0;i<9;i++)
cout<<a[i]<<endl;
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={74,68,66,82,81,88};
int b[2]={90,66};
int c[3]={75,77,68};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
double A;
sum=e+g+i;
A=sum/(6*3+1*2+2*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 國文 2 90",
"必修 GE0102A 英文 3 74",
"必修 GE0103A 中國通史 2 66",
"必修 GE0105A 勞作教育 0 75",
"必修 IM0004 管理學 3 68",
"必修 IM0041 計算機概論 3 66",
"必修 IM0042 微積分(一) 3 82",
"必修 IM0043 經濟學(一) 3 81",
"必修 IM0044 會計學(一) 3 88",
"必修 ML01AA 軍訓 0 77",
"必修 PE01AA 體育(大一) 0 68",
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
And:
必修 GE0101A 國文 2 90
必修 GE0102A 英文 3 74
必修 GE0103A 中國通史 2 66
必修 GE0105A 勞作教育 0 75
必修 IM0004 管理學 3 68
必修 IM0041 計算機概論 3 66
必修 IM0042 微積分(一) 3 82
必修 IM0043 經濟學(一) 3 81
必修 IM0044 會計學(一) 3 88
必修 ML01AA 軍訓 0 77
必修 PE01AA 體育(大一) 0 68
學期加權平均=77.00請按任意鍵繼續 . . .
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={60,56,60,60,67,75};
int b[2]={63,60};
int c[3]={75,67,70};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
float A;
sum=e+g+i;
A=sum/(6*3+1*2+2*0);
printf("學期加權平均=%.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 63 " ,
"必修 GE0102A 丙 英文 3 60 " ,
"必修 GE0103A 丙 中國通史 2 60 " ,
"必修 GE0105A 丙 勞作教育 0 75 " ,
"必修 IM0004 丙 管理學 3 56 " ,
"必修 IM0041 丙 計算機概論 3 60 " ,
"必修 IM0042 丙 微積分(一) 3 60 " ,
"必修 IM0043 丙 經濟學(一) 3 67 " ,
"必修 IM0044 丙 會計學(一) 3 75 " ,
"必修 ML01AA 丙 軍訓 0 67 " ,
"必修 PE01AA 丙 體育(大一) 0 70 " ,
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
必修 GE0101A 丙 國文 2 63
必修 GE0102A 丙 英文 3 60
必修 GE0103A 丙 中國通史 2 60
必修 GE0105A 丙 勞作教育 0 75
必修 IM0004 丙 管理學 3 56
必修 IM0041 丙 計算機概論 3 60
必修 IM0042 丙 微積分(一) 3 60
必修 IM0043 丙 經濟學(一) 3 67
必修 IM0044 丙 會計學(一) 3 75
必修 ML01AA 丙 軍訓 0 67
必修 PE01AA 丙 體育(大一) 0 70
學期加權平均=63.00請按任意鍵繼續 . . .
#include <iostream>
#include <cstdlib>
using namespace std;
void test(void);
int main(){
test();
int a[6]={67,60,62,60,43,60};
int b[1]={60};
int c[2]={82,63};
int d[1]={85};
int sum=0;
int s,i;
s=0;
for(i=0;i<6;i++)
s=s+a[i]*3;
int S,I;
S=0;
for(I=0;I<1;I++)
S=S+b[I]*2;
int z,p;
z=0;
for(p=0;p<2;p++)
z=z+c[p]*1;
int Z,P;
Z=0;
for(P=0;P<1;P++)
Z=Z+d[P]*0;
double A;
sum=s+S+z+Z;
A=(float)sum/(6*3+1*2+2*1+1*0);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[10][40]={
"必修 GE0103A 中國通史 2 60",
"必修 IM0017 系統分析與設計 3 67",
"必修 IM0021 資料庫管理系統 3 60",
"必修 IM0022 資訊管理實務專題(一) 1 82",
"必修 IM0039 資訊管理講座(一) 1 63",
"必修 IM0044 會計學(一) 3 62",
"必修 IM0059 網頁程式設計 3 60",
"必修 IM0095 資訊網路安全 3 43",
"必修 PE0Z0L 體育(體適能) 0 85",
"選修 MD0030 經濟學(一) 3 60" ,
};
for (int i=0;i<10;i++)
cout<<i<<"\t"<<a[i]<<endl;
}
0 必修 GE0103A 中國通史 2 60
1 必修 IM0017 系統分析與設計 3 67
2 必修 IM0021 資料庫管理系統 3 60
3 必修 IM0022 資訊管理實務專題(一) 1 82
4 必修 IM0039 資訊管理講座(一) 1 63
5 必修 IM0044 會計學(一) 3 62
6 必修 IM0059 網頁程式設計 3 60
7 必修 IM0095 資訊網路安全 3 43
8 必修 PE0Z0L 體育(體適能) 0 85
9 選修 MD0030 經濟學(一) 3 60
學期加權平均=60.05請按任意鍵繼續 . . .
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={60,57,49,60,64,67};
int b[2]={55,41};
int c[3]={75,74,60};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
float A;
sum=e+g+i;
A=sum/(6*3+1*2+2*0);
printf("學期加權平均=%.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 55" ,
"必修 GE0102A 丙 英文 3 60" ,
"必修 GE0103A 丙 中國通史 2 41" ,
"必修 GE0105A 丙 勞作教育 0 75" ,
"必修 IM0004 丙 管理學 3 57" ,
"必修 IM0041 丙 計算機概論 3 49" ,
"必修 IM0042 丙 微積分(一) 3 60" ,
"必修 IM0043 丙 經濟學(一) 3 64" ,
"必修 IM0044 丙 會計學(一) 3 67" ,
"必修 ML01AA 丙 軍訓 0 74" ,
"必修 PE01AA 丙 體育(大一) 0 60" ,
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
必修 GE0101A 丙 國文 2 55
必修 GE0102A 丙 英文 3 60
必修 GE0103A 丙 中國通史 2 41
必修 GE0105A 丙 勞作教育 0 75
必修 IM0004 丙 管理學 3 57
必修 IM0041 丙 計算機概論 3 49
必修 IM0042 丙 微積分(一) 3 60
必修 IM0043 丙 經濟學(一) 3 64
必修 IM0044 丙 會計學(一) 3 67
必修 ML01AA 丙 軍訓 0 74
必修 PE01AA 丙 體育(大一) 0 60
學期加權平均=59.00請按任意鍵繼續 . . .
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={89,88,81,98,88,83};
int b[2]={87,87};
int c[3]={90,75,75};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<2;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<3;j++)
i=i+c[j]*0;
double A=0.0;
sum=e+g+i;
A=sum/(6*3+1*2+2*1);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[9][60]={
"課名 成績 學分數\n"
"國文 87 2 ",
"英文 89 3 ",
"中國通史 87 2 ",
"勞作教育 75 0 ",
"管理學 88 3 ",
"計算機概論 81 3 ",
"微積分(一) 98 3 ",
"經濟學(一) 88 3 ",
"會計學(一) 83 3 ",
};
for (int i=0;i<9;i++)
cout<<a[i]<<endl;
}
#include <iostream>
#include <cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={80,74,61,66,64,82};
int b[2]={92,77};
int c[3]={75,82,72};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<2;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<3;j++)
i=i+c[j]*0;
double A;
sum=e+g+i;
A=sum/(6*3+1*2+2*1);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[9][60]={
"課名 學分數 成績\n "
"國文 2 77 " ,
"英文 3 80 " ,
"中國通史 2 92 " ,
"勞作教育 0 75 " ,
"管理學 3 74 " ,
"計算機概論 3 61 " ,
"微積分(一) 3 66 " ,
"經濟學(一) 3 64 " ,
"會計學(一) 3 82 " ,
"軍訓 0 82 " ,
"體育(大一) 0 72 " ,
};
for (int i=0;i<9;i++)
cout<<a[i]<<endl;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={81,65,67,75,74,67,60,78,72,70,63};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
char s[11][30]={
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學,甲",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system("Pause");
return 0;
}
include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
char d[11][100]={
"GE0101A 丙 國文 2 92",
"GE0102A 丙 英文 3 72",
"GE0103A 丙 中國通史 2 88",
"IM0004 丙 管理學 3 74",
"IM0041 丙 計算機概論 3 74",
"IM0042 丙 微積分(一) 3 77",
"IM0043 丙 經濟學(一) 3 86",
"IM0044 丙 會計學(一) 3 78",
"GE0105A 丙 勞作教育 0 75",
"ML01AA 丙 軍訓 0 89",
"PE01AA 丙 體育(大一) 0 74",
};
for (int j=0; j<11; j++)
cout<<j<<"\t"<<d[j]<<endl;
int s[11]={92,72,88,74,74,77,86,78,75,89,74};
int c[11]={2,3,2,3,3,3,3,3,0,0,0};
int sum = 0;
float average;
int i;
for(i=0;i<11;i++)
sum =sum+s[i]*c[i];
average=(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
{
char s[11][30]={
"GE0101A 國文 83 2",
"GE0102A 英文 71 3",
"GE0103A 中國通史 74 2",
"GE0105A 勞作教育 80 0",
"IM0004 管理學 72 3",
"IM0041 計算機概論 67 3",
"IM0042 微積分(一) 79 3",
"IM0043 經濟學(一) 75 3",
"IM0044 會計學(一) 82 3",
"ML01AA 軍訓 73 0",
"PE01AA 體育(大一) 78 0"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={83,71,74,80,72,67,79,75,82,73,78};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average = (float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={74,65,79,75,74,64,94,79,79,85,67};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for(i=0;i<11;i++)
x=x+c[i];
y=(float)sum/x;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<" "<<endl;
printf("總學分:%d\n",x);
printf("加權平均:%5.2f\n",y);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={64,63,60,75,67,71,65,80,77,87,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
char s[11][30]=
{
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"IM0004 管理學 ",
"GE0105A 勞作教育 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) ",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
printf ("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system ("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={70,69,72,75,66,67,60,72,74,89,72};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
char s[11 ][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"學分數:"<<ctotal<<endl;
cout<<"加權平均值:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={80,62,65,80,84,60,60,75,80,72,72};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};char y[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計",
"軍訓",
"體育",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<y[i]<<" "<<t[i]<<" "<<c[i]<<endl;
int i,sum=0;
float avreage;
for(i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
avreage=(float)sum/ctotal;
//printf("課名%d\n",y[11][22]);
printf("學分:%d\n", ctotal);
printf("平均:%5.2f", avreage);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={72,67,54,75,73,62,60,74,70,80,75};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
printf("學分數:%d\n",ctotal);
printf("加權平均值:%5.2f\n",average);
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
{char s[11][100]={
"GE0101A國文, 2, 78",
"GE0102A英文, 3, 75",
"GE0103A中國通史, 2, 80",
"GE0105A勞作教育, 0, 75",
"IM0004管理學, 3, 84",
"IM0041計算機概論, 3, 77",
"IM0042徵積分, 3, 94",
"IM0043經濟學, 3, 85",
"IM0044會計學,丙, 3, 85",
"ML01AA軍訓,丙, 0, 84",
"PE01AA體育{大一}, 0, 73"};
for(int x=0;x<11;x++)
cout<<x<<"\t"<<s[x]<<endl;}
int t[11] = {79,75,80,75,84,77,94,85,85,84,73};
int s[11] = {2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*s[i];
average = (float)sum/22;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
int t[11]={66,69,65,75,73,74,71,68,74,84,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0} ;
int x=0,i,sum=0;
float y;
for (i=0;i<11;i++)
sum =sum+t[i]*c[i];
for (i=0;i<11;i++)
x=x+c[i];
y=(float)sum/x ;
char s[11][30]={
"GE0101A 國文 66, 2",
"GE0102A 英文 69, 3",
"GE0103A 中國通史, 65, 2",
"GE0105A 勞作教育 75, 3",
"IM0004 管理學 73, 3",
"IM0041 計算機概論 74, 3",
"IM0042 微積分(一) 71, 3",
"IM0043 經濟學(一) 68, 3",
"IM0044 會計學(一) 74, 3 ",
"ML01AA 軍訓 84, 0",
"PE01AA 體育(大一) 80, 0 " ,
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
printf ("總分:%d\n",x);
printf ("平均:%5.2f\n",y);
system ("pause");
return 0 ;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
{
char s[11][100]={
"GE0101A 丙 國文, 99, 2 ",
"GE0102A 丙 英文, 83, 3 ",
"GE0103A 丙 中國通史, 90, 2 ",
"GE0105A 丙 勞作教育, 75, 0 ",
"IM0004 丙 管理學, 86, 3 ",
"IM0041 丙 計算機概論, 73, 3 ",
"IM0042 丙 微積分(一), 72, 3 ",
"IM0043 丙 經濟學(一), 87, 2 ",
"IM0044 丙 會計學(一), 83, 3 ",
"ML01AA 丙 軍訓, 89, 0 ",
"PE01AA 丙 體育(大一), 80, 0 "
};
for (int J=0; J<11; J++)
cout<<J<<"\t"<<s[J]<<endl;
}
int t[11]={99,83,90,75,86,73,72,87,83,89,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum += t[i]*c[i];
average=(float)sum/22;
cout<<"加權:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={81,65,67,75,74,67,60,78,72,70,63};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學,甲 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) ",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<" "<<endl;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {56,63,63,80,66,60,62,79,80,81,71};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
/*cout<<"是否21:"<< <<end1;*/
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 2 71",
"GE0102A 英文 3 56",
"GE0103A 中國通史 2 55",
"GE0105A 勞作教育 0 85",
"IM0004 管理學 3 70",
"IM0041 計算機概論 3 43",
"IM0042 微積分(一) 3 60",
"IM0043 經濟學(一) 3 68",
"IM0044 會計學(一) 3 67",
"ML01AA 軍訓 0 80",
"PE01AA 體育(大一) 0 70"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11] = {71,56,55,85,70,43,60,68,67,80,70};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i];
average = (float)sum / 22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[12]={83,68,87,77,75,72,68,80,76,73,69,74};
int c[12]={0,2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=11 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=11;i++)
{
ctotal+=c[i];
}
char s[12][40]={
"CR1001操行 ",
"GE0101A國文 ",
"GE0102A英文 ",
"GE0103A中國通史 ",
"GE0105A勞作教育 ",
"IM0004管理學 ",
"IM0041計算機概論",
"IM0042微積分(一)",
"IM0043經濟學(一)",
"IM0044會計學(一)",
"ML01AA軍訓 ",
"PE01AA體育(大一)"
};
for (int i=0; i<12; i++)
cout<<i<<"\t"<<s[i]<<"\t"<<t[i]<<"\t"<<c[i]<<"\t"<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
if (average<11)
printf("有無二一 : 有\n");
else
printf("有無二一 : 沒有\n");
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 2 56",
"GE0102A 英文 3 51",
"GE0103A 中國通史 2 61",
"GE0105A 勞作教育 0 85",
"IM0004 管理學 3 63",
"IM0041 計算機概論 3 43",
"IM0042 微積分(一) 3 65",
"IM0043 經濟學(一) 3 56",
"IM0044 會計學(一) 3 60",
"ML01AA 軍訓 0 69",
"PE01AA 體育(大一) 0 74",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11] = { 56,51,61,85,63,43,65,56,60,69,74 };
int c[11] = { 2,3,2,0,3,3,3,3,3,0,0 };
int sum = 0; /* 總分 */
float average; /* 平均 */
int i;
for ( i = 0; i < 11; i++ )
sum=sum+t[i]*c[i]; /* 計算總分 */
average = (float)sum / 22; /* 計算平均 */
cout<<"總分:"<<sum<<endl; /* 顯示總分 */
cout<<"平均:"<<average<<endl;/* 顯示平均 */
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={80,63,71,75,56,60,60,75,73,75,85};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0;i<=10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
char s[11][30]={
"GE0101A國文 ",
"GE0102A英文 ",
"GE0103A中國通史 ",
"GE0105A勞作教育 ",
"IM0004管理學 ",
"IM0041計算機概論",
"IM0042微積分(一)",
"IM0043經濟學(一)",
"IM0044會計學(一)",
"ML01AA軍訓 ",
"PE01AA體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[12]={80,71,73,75,75,69,66,85,66,70,70,70};
int c[12]={0,2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=11 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=11;i++)
{
ctotal+=c[i];
}
char s[12][40]={
"CR1001操行 ",
"GE0101A國文 ",
"GE0102A英文 ",
"GE0103A中國通史 ",
"GE0105A勞作教育 ",
"IM0004管理學 ",
"IM0041計算機概論",
"IM0042微積分(一)",
"IM0043經濟學(一)",
"IM0044會計學(一)",
"ML01AA軍訓 ",
"PE01AA體育(大一)"
};
for (int i=0; i<12; i++)
cout<<i<<"\t"<<s[i]<<"\t"<<t[i]<<"\t"<<c[i]<<"\t"<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
if (average<11)
printf("有無二一 : 有\n");
else
printf("有無二一 : 沒有\n");
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 56 2",
"GE0102A 英文 73 3",
"GE0103A 中國通史 60 2",
"GE0105A 勞作教育 75 0",
"IM004 管理學 66 3",
"IM0041 計算機概論 60 3",
"IM0042 微積分(一) 65 3",
"IM0043 經濟學(一)62 3",
"IM0044 會計學(一) 52 3",
"ML01AA 軍訓 66 0",
"PE01AA 體育(大一) 64 0",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={56,73,60,75,66,60,65,62,52,66,64};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 56 2",
"GE0102A 英文 73 3",
"GE0103A 中國通史 60 2",
"GE0105A 勞作教育 75 0",
"IM004 管理學 66 3",
"IM0041 計算機概論 60 3",
"IM0042 微積分(一) 65 3",
"IM0043 經濟學(一)62 3",
"IM0044 會計學(一) 52 3",
"ML01AA 軍訓 66 0",
"PE01AA 體育(大一) 64 0",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={56,73,60,75,66,60,65,62,52,66,64};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
{
char s[11][100]={
"GE0101A 丙 國文, 99, 2 ",
"GE0102A 丙 英文, 83, 3 ",
"GE0103A 丙 中國通史, 90, 2 ",
"GE0105A 丙 勞作教育, 75, 0 ",
"IM0004 丙 管理學, 86, 3 ",
"IM0041 丙 計算機概論, 73, 3 ",
"IM0042 丙 微積分(一), 72, 3 ",
"IM0043 丙 經濟學(一), 87, 3 ",
"IM0044 丙 會計學(一), 83, 3 ",
"ML01AA 丙 軍訓, 89, 0 ",
"PE01AA 丙 體育(大一), 80, 0 "
};
for (int J=0; J<11; J++)
cout<<J<<"\t"<<s[J]<<endl;
}
int t[11]={99,83,90,75,86,73,72,87,83,89,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum += t[i]*c[i];
average=(float)sum/22;
cout<<"加權:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={66,74,65,80,64,36,40,67,73,68,69};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
char s[11][30]={
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學,甲",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int s=0,i;
float a;
int x[11]={96,79,83,75,80,76,92,80,84,89,79};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
for(i=0;i<11;i++)
s+=x[i]*y[i];
int c=0;
for(i=0;i<11;i++)
c+=y[i];
a=(float)s/c;
char t[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育"};
for(i=0;i<11;i++)
printf("課名: %s %d %d \n",t[i],x[i],y[i]);
printf("及格學分 %d \n",c);
printf("總成績 %d \n",s);
printf("總平均 %.2f \n",a);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[12]={83,83,92,84,71,75,77,68,86,84,79,84};
int c[12]={0,2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=11 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=11;i++)
{
ctotal+=c[i];
}
char s[12][40]={
"CR1001操行 ",
"GE0101A國文 ",
"GE0102A英文 ",
"GE0103A中國通史 ",
"GE0105A勞作教育 ",
"IM0004管理學 ",
"IM0041計算機概論",
"IM0042微積分(一)",
"IM0043經濟學(一)",
"IM0044會計學(一)",
"ML01AA軍訓 ",
"PE01AA體育(大一)"
};
for (int i=0; i<12; i++)
cout<<i<<"\t"<<s[i]<<"\t"<<t[i]<<"\t"<<c[i]<<"\t"<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
if (average<11)
printf("有無二一 : 有\n");
else
printf("有無二一 : 沒有\n");
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int a[11]={76,70,70,75,71,77,85,64,77,85,82};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<11;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<11;i++)
{
ctotal+=b[i];
}
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<a[i]<<" "<<b[i]<<endl;
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[12]={83,77,81,67,75,76,65,96,76,70,66,77};
int c[12]={0,2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=11 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=11;i++)
{
ctotal+=c[i];
}
char s[12][40]={
"CR1001操行 ",
"GE0101A國文 ",
"GE0102A英文 ",
"GE0103A中國通史 ",
"GE0105A勞作教育 ",
"IM0004管理學 ",
"IM0041計算機概論",
"IM0042微積分(一)",
"IM0043經濟學(一)",
"IM0044會計學(一)",
"ML01AA軍訓 ",
"PE01AA體育(大一)"
};
for (int i=0; i<12; i++)
cout<<i<<"\t"<<s[i]<<"\t"<<t[i]<<"\t"<<c[i]<<"\t"<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
if (average<11)
printf("有無二一 : 有\n");
else
printf("有無二一 : 沒有\n");
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 74 2",
"GE0102A 英文 65 3",
"GE0103A 中國通史 60 2",
"GE0105A 勞作教育 75 0",
"IM004 管理學 75 3",
"IM0041 計算機概論 60 3",
"IM0042 微積分(一) 60 3",
"IM0043 經濟學(一)70 3",
"IM0044 會計學(一) 66 3",
"ML01AA 軍訓 74 0",
"PE01AA 體育(大一) 64 0",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={74,65,60,75,75,60,60,70,66,74,64};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
{char s[11][100]={
"GE0101A國文 98 2",
"GE0102A英文 95 3",
"GE0103A中國通史 64 2",
"GE0105A勞作教育 75 0",
"IM0004管理學,甲 77 3",
"IM0041計算機概論 63 3",
"IM0042微積分(一) 64 3",
"IM0043經濟學(一) 80 3",
"IM0044會計學(一) 80 3",
"ML01AA軍訓 89 0",
"PE01AA體育(大一) 73 0"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
}
int t[11]={94,65,64,75,77,63,64,80,80,89,73};
int s[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for (i=0; i<11; i++)
sum += t[i]*s[i];
average= (float)sum /22;
cout<<"加權平均:"<<average<<endl;
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("上學期加權平均:\n\t");
int p[11]={80,75,78,72,73,60,85,87,75,66,63};
int s[11]={2,2,3,3,3,3,3,3,0,0,0};
int x,y,z;
x=0;
z=22;
for(y=0;y<8;y++)
x=x+p[y]*s[y];
float i;
i=x/z;
printf("學分=%d\n\t平均=%.2f\n\n",z,i);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={53,70,75,64,45,40,51,50,68,67,69};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
char s[11][30]={
"GE0101A 國文",
"GE0102A 英文",
"GE0103A 中國通史",
"GE0105A 勞作教育",
"IM0004 管理學,甲",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,z;
float s,a;
s=0;
int x[11]={96,83,88,75,88,84,88,87,82,88,66};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
char q[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育"};
for (i=0;i<11;i++)
s+=x[i]*y[i];
a=s/22.0;
printf("總分 %.2f\n",s);
z=0;
for(i=0;i<11;i++)
z+=y[i];
printf("及格學分共 %d\n",z);
{
for(i=0;i<11;i++)
printf("課名 %s %d %d\n",q[i],x[i],y[i]);
}
if (a>=50){
printf("平均為 %.2f 及格\n",a);
}
else {
printf("平均為 %.2f 不及格\n",a);
}
system("pause");
return 0;
}
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 39 2",
"GE0102A 英文 57 3",
"GE0103A 中國通史 53 2",
"GE0105A 勞作教育 75 0",
"IM004 管理學 56 3",
"IM0041 計算機概論 36 3",
"IM0042 微積分(一) 40 3",
"IM0043 經濟學(一)48 3",
"IM0044 會計學(一) 53 3",
"ML01AA 軍訓 57 0",
"PE01AA 體育(大一) 65 0",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={39,57,33,75,56,36,40,48,53,57,65};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={78,77,79,85,72,64,60,67,81,81,76};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
char a[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<a[i]<<" "<<t[i]<<" "<<c[i]<<endl;
int i,sum=0;
float avreage;
for(i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
avreage=(float)sum/ctotal;
//printf("課名%d\n",a[11][22]);
printf("學分:%d\n", ctotal);
printf("平均:%5.2f", avreage);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,z;
float s,a;
s=0;
int x[11]={75,70,70,85,77,60,60,76,86,68,74};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
char q[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育"};
for (i=0;i<11;i++)
s+=x[i]*y[i];
a=s/22.0;
printf("總分 %2f\n",s);
z=0;
for (i=0;i<11;i++)
z+=y[i];
printf("及格學分總數 %d\n",z);
for (i=0;i<11;i++)
printf("課名 %s %d %d\n",q[i],x[i],y[i]);
if (a>=50){
printf("平均為 %.2f 及格!!過關囉~~\n",a);
}
else {
printf("平均為 %.2f 不及格!!從修囉~~\n",a);
}
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int s=0,i;
float a;
int x[11]={89,75,88,75,79,76,81,77,81,91,62};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
for(i=0;i<11;i++)
s+=x[i]*y[i];
int c=0;
for(i=0;i<11;i++)
c+=y[i];
a=(float)s/c;
char t[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育"};
for(i=0;i<11;i++)
printf("課名: %10s %d \t %d \n",t[i],x[i],y[i]);
printf("及格學分 %d \n",c);
printf("總成績 %d \n",s);
printf("總平均 %.2f \n",a);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={82,64,79,82,76,60,60,70,81,28,51};
int c[11]={0,1,2,2,3,3,3,3,0,2,3} ;
for (i=0;i<11;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<11;i++)
{
ctotal+=c[i];
}
char s[11][50]={
"CR1011操行 ",
"GE0203A英文字彙與閱讀 ",
"GE0204A公民社會概論 ",
"GE0205A 人類活動與地球環境變遷 ",
"IM0009資料結構 ",
"IM0021資料庫管理系統 ",
"IM0063統計學[一] ",
"IM0103企業電子化 ",
"PE0Z0G體育(羽球) ",
"GE3ZA033科技與人文[科技] ",
"IM0078Linux系統建置與管理 ",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main ()
{
int t[11]={66,69,65,75,73,74,71,68,74,84,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0} ;
int x=0,i,sum=0;
float y;
for (i=0;i<11;i++)
sum =sum+t[i]*c[i];
for (i=0;i<11;i++)
x=x+c[i];
y=(float)sum/x ;
char s[11][30]={
"GE0101A 國文 66, 2",
"GE0102A 英文 69, 3",
"GE0103A 中國通史, 65, 2",
"GE0105A 勞作教育 75, 3",
"IM0004 管理學 73, 3",
"IM0041 計算機概論 74, 3",
"IM0042 微積分(一) 71, 3",
"IM0043 經濟學(一) 68, 3",
"IM0044 會計學(一) 74, 3 ",
"ML01AA 軍訓 84, 0",
"PE01AA 體育(大一) 80, 0 " ,
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
printf ("總分:%d\n",x);
printf ("平均:%5.2f\n",y);
system ("pause");
return 0 ;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int a[11]={84,79,68,75,70,60,60,69,63,62,65};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<11;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<11;i++)
{
ctotal+=b[i];
}
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<a[i]<<" "<<b[i]<<endl;
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[12]={89,69,81,80,61,90,62,74,73,78,80,89};
int c[12]={0,1,2,2,2,3,3,3,3,3,3,0};
int sum=0;
int ctotal=0;
float average;
int i;
for(i=0;i<=11;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=11;i++)
{
ctotal=ctotal+c[i];
}
char s[13][50]={
"課程名稱 分數 學分 ",
"操行 89 0 ",
"英文字彙與閱讀 69 1 ",
"公民社會概論 81 2 ",
"人類活動與地球環境變遷 80 2 ",
"基礎日文[一般] 61 2 ",
"資料結構 90 3 ",
"生產管理 62 3 ",
"資料庫管理系統 74 3 ",
"會計資訊系統 73 3 ",
"會計資訊系統 78 3 ",
"企業電子化 80 3 ",
"體育(韻律) 89 0 ",
};
for (int i=0; i<13; i++)
{
printf(s[i]);
printf("\n");
}
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={80,78,75,75,72,73,85,87,63,66};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
char s[11][30]=
{
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"學分數:"<<ctotal<<endl;
cout<<"加權平均值:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={80,78,75,75,72,73,85,87,63,66};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
char s[11 ][30]=
{
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"學分數:"<<ctotal<<endl;
cout<<"加權平均值:"<<average<<endl;
system("Pause");
return 0;
}
0 GE0101A 國文 80 2
1 GE0102A 英文 78 3
2 GE0103A 中國通史 75 2
3 GE0105A 勞作教育 75 0
4 IM0004 管理學 72 3
5 IM0041 計算機概論 73 3
6 IM0042 微積分(一) 85 3
7 IM0043 經濟學(一) 87 3
8 IM0044 會計學(一) 63 3
9 ML01AA 軍訓 66 0
10 PE01AA 體育(大一) 0 0
學分數:22
加權平均值:76.55
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,z;
float s,a;
s=0;
int x[11]={84,79,74,70,75,66,76,71,78,75,73};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
char q[11][22]={
"國文",
"英文",
"中國通史",
"勞作教育",
"管理學",
"計算機概論",
"微積分",
"經濟學",
"會計學",
"軍訓",
"體育"};
for (i=0;i<11;i++)
s+=x[i]*y[i];
a=s/22.0;
printf("總分 %2f\n",s);
z=0;
for (i=0;i<11;i++)
z+=y[i];
printf("及格學分總數 %d\n",z);
for (i=0;i<11;i++)
printf("課名 %s %d %d\n",q[i],x[i],y[i]);
if (a>=50){
printf("平均為 %.2f 及格,過關!!恭喜!!!\n",a);
}
else {
printf("平均為 %.2f 不及格,重修><加油唷!\n",a);
}
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[10]={87,81,89,76,62,76,79,62,79,87};
int c[10]={1,2,2,3,3,3,3,3,3,0};
int sum=0;
int ctotal=0;
float average;
int i;
for(i=0;i<=9;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=9;i++)
{
ctotal=ctotal+c[i];
}
char s[12][50]={
"課名 學分 成績",
"操行 0 89",
"英文字彙與閱讀 1 87",
"公民社會概論 2 81",
"人類活動與地球環境變遷 2 89",
"資料結構 3 76",
"資料庫管理系統 3 62",
"會計資訊系統 3 76",
"會計學(一) 3 79",
"統計學[一] 3 62",
"企業電子化 3 79",
"體育(韻律) 0 87",
};
for (int i=0;i<12;i++)
{
printf(s[i]);
printf("\n");
}
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={99,83,90,75,86,73,72,87,83,89,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum += t[i]*c[i];
average=(float)sum/22;
cout<<"加權:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={89,72,80,75,76,72,60,76,79,58,78};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for(i=0;i<=11;i++)
{
sum=sum+t[i]*c[i];
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n",average);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[10]={82,74,66,74,69,60,60,65,36,90};
int c[10]={0,1,2,2,3,3,3,3,3 ,0} ;
for (i=0;i<10;i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<10;i++)
{
ctotal+=c[i];
}
char s[10][50]={
"CR1011操行 ",
"GE0203A英文字彙與閱讀 ",
"GE0204A公民社會概論 ",
"GE0205A 人類活動與地球環境變遷 ",
"IM0009資料結構 ",
"IM0021資料庫管理系統 ",
"IM0063統計學[一] ",
"IM0103企業電子化 ",
"IM0044 會計學(一) ",
"PE0Z0M體育(韻律) ",
};
for (int i=0; i<10; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={80,78,75,75,72,73,60,85,87,62,66};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
char s[11][30]=
{
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"學分數:"<<ctotal<<endl;
cout<<"加權平均值:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {79,83,68,65,71,60,40,61,60,79,61};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {75,82,74,65,69,60,60,62,53,81,61};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={80,73,75,75,69,66,85,66,70,70};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=10 ; i++)
{
sum=sum+t[i]*c[i];
{
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
system ("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={89,75,88,75,79,76,81,77,81,91,62};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float a;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int j=0;
for (i=0;i<11;i++)
j+=c[i];
a=(float)sum/(float)j;
printf("學分:%d\n\n",j);
printf("平均:%5.2f\n\n",a);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={66,69,65,75,73,74,71,68,74,84,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0} ;
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average = (float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={80,78,75,75,72,73,60,85,87,62,66};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
cout<<"學分數:"<<ctotal<<endl;
cout<<"加權平均值:"<<average<<endl;
system("Pause");
return 0;
}
學分數:22
加權平均值:76.1364
#include <stdio.h>
#include <stdlib.h>
int main()
{
int s=0,i;
float a;
int x[11]={96,79,83,75,80,76,92,80,84,89,79};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
for(i=0;i<11;i++)
s+=x[i]*y[i];
int c=0;
for(i=0;i<11;i++)
c+=y[i];
a=(float)s/c;
printf("及格學分: %d \n",c);
printf("加權後總平均: %.2f \n",a);
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int x[11]={96,83,88,75,88,84,88,87,82,88,66};
int y[11]={2,3,2,0,3,3,3,3,3,0,0};
int s=0,c=0;
float a;
int i;
for(i=0;i<=10;i++)
{
s+=x[i]*y[i];
}
for(i=0;i<=10;i++)
{
c=c+y[i];
}
a=(float)s/c;
printf("平均:%.2f\n",a);
printf("學分數:%d",c);
system("pause");
return 0;
}
#include <iostream>
#include<cstring>
using namespace std;
int main(){
int a[6]={89,88,81,98,88,83};
int b[2]={87,87};
int c[3]={90,75,75};
int x[9]={2,3,2,0,3,3,3,3,3};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<2;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<3;j++)
i=i+c[j]*0;
double A=0.0;
sum=e+g+i;
A=sum/(6*3+1*2+2*1);
int k,u=0;
for(k=0;k<=8;k++)
{
u+=x[k];
}
printf("學分數:%d\n",u);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={89,88,81,98,88,83};
int b[2]={87,87};
int c[3]={90,75,75};
int x[9]={2,3,2,0,3,3,3,3,3};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<2;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<3;j++)
i=i+c[j]*0;
double A=0.0;
sum=e+g+i;
A=sum/(6*3+1*2+2*1);
int k,u=0;
for(k=0;k<=8;k++)
{
u+=x[k];
}
printf("學分數:%d\n",u);
printf("學期加權平均=%5.2f",A);
system("Pause");
}
void test(){
char a[9][60]={
"課名 成績 學分數\n"
"國文 87 2 ",
"英文 89 3 ",
"中國通史 87 2 ",
"勞作教育 75 0 ",
"管理學 88 3 ",
"計算機概論 81 3 ",
"微積分(一) 98 3 ",
"經濟學(一) 88 3 ",
"會計學(一) 83 3 ",
};
for (int i=0;i<9;i++)
cout<<a[i]<<endl;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int a[11]={78,77,79,85,72,64,60,67,81,81,76};
int b[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0,ctotal=0;
float average;
for(i=0;i<11;i++)
{
sum=sum+a[i]*b[i];
}
for(i=0;i<11;i++)
{
ctotal+=b[i];
}
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004 管理學 ",
"IM0041 計算機概論",
"IM0042 微積分(一)",
"IM0043 經濟學(一)",
"IM0044 會計學(一)",
"ML01AA 軍訓 ",
"PE01AA 體育(大一)",
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<a[i]<<" "<<b[i]<<endl;
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數%d\n",average,ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={90,74,66,75,68,66,82,81,88,77,68};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average = (float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[11]={81,65,67,75,74,67,60,78,72,70,63};
int c[11]={3,3,3,3,3,3,2,2,0,0,0};
int i,sum=0;
float y;
for (i=0;i<11;i++)
sum=sum+t[i]*c[i];
int x=0;
for (i=0;i<11;i++)
x=x+c[i] ;
y=(float)sum/x;
printf("學分:%d\n",x);
printf("平均:%5.2f\n",y);
system ("pause");
return 0;
}
學分:22
平均:71.05
請按任意鍵繼續 . . .
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={99,83,90,75,86,73,72,87,83,89,80};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum += t[i]*c[i];
average=(float)sum/22;
cout<<"加權:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={94,65,64,75,77,63,64,80,80,89,73};
int s[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for (i=0; i<11; i++)
sum += t[i]*s[i];
average= (float)sum /22;
cout<<"加權平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={94,65,64,75,77,63,64,80,80,89,73};
int s[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for (i=0; i<11; i++)
sum += t[i]*s[i];
average= (float)sum /22;
cout<<"加權平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={83,64,81,75,72,63,89,68,71,76,71};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int i,sum=0,ctotal=0;
float average;
int t[11]={68,87,77,75,72,68,80,76,73,69,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
for (i=0 ; i<=10 ; i++)
{
sum=sum+t[i]*c[i];
}
for (i=0;i<=10;i++)
{
ctotal+=c[i];
}
average=(float)sum/ctotal;
printf("加權平均值=%5.2f\n學分數=%d\n" , average , ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
int a[6]={64,85,75,64,92,37};
int b[1]={60};
int c[2]={82,62};
int d[1]={86};
int x[10]={0,1,1,2,3,3,3,3,3,3};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*1;
int k,l;
k=0;
for(l=0;l<1;l++)
k=k+d[l]*0;
float A;
sum=e+g+i+k;
A=(float)sum/(6*3+1*2+2*1+1*0);
int p,u=0;
for(p=0;p<=9;p++)
{
u+=x[p];
}
printf("學期加權平均=%5.2f",A);
printf("學分數:%d\n",u);
system("Pause");
}
學期加權平均=68.86學分數:22
請按任意鍵繼續 . . .
#include <iostream>
#include <cstdlib>
using namespace std;
int main(){
int a[6]={67,60,62,60,43,60};
int b[1]={60};
int c[2]={82,63};
int d[1]={85};
int x[10]={3,3,3,3,3,3,2,1,1,0};
int sum=0;
int s,i;
s=0;
for(i=0;i<6;i++)
s=s+a[i]*3;
int S,I;
S=0;
for(I=0;I<1;I++)
S=S+b[I]*2;
int z,p;
z=0;
for(p=0;p<2;p++)
z=z+c[p]*1;
int Z,P;
Z=0;
for(P=0;P<1;P++)
Z=Z+d[P]*0;
float A;
sum=s+S+z+Z;
A=(float)sum/(6*3+1*2+2*1+1*0);
int l,u=0;
for(l=0;l<=9;l++)
{
u+=x[l];
}
printf("學期加權平均=%5.2f",A);
printf("學分數:%d\n",u);
system("Pause");
}
學期加權平均=60.05學分數:22
請按任意鍵繼續 . . .
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {47,57,57,75,78,60,60,76,75,81,71};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={83,64,81,75,72,63,89,68,71,76,71};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average =(float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={75,70,70,85,77,60,60,76,86,68,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
printf("加權平均值:%5.2f\n",average);
printf("學分數:%d\n",ctotal);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main()
{
int t[11]={75,70,70,85,77,60,60,76,86,68,74};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int i,sum=0;
float average;
for (i=0;i<11;i++)
sum+=t[i]*c[i];
int ctotal=0;
for(i=0;i<11;i++)
ctotal+=c[i];
average=(float)sum/ctotal;
printf("加權平均值:%5.2f\n",average);
printf("學分數:%d\n",ctotal);
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {89,72,80,75,76,72,60,76,79,58,78};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
課名 學分數 成績
國文 2 77 " ,
英文 3 80
中國通史 2 92
勞作教育 0 75
管理學 3 74
計算機概論 3 61
微積分(一) 3 66
經濟學(一) 3 64
會計學(一) 3 82
軍訓 0 82
體育(大一) 0 72
加權平均 73.59
學分數 22
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int t[11]={94,65,64,75,77,63,64,80,80,89,73};
int s[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum = 0;
float average;
int i;
for (i=0; i<11; i++)
sum += t[i]*s[i];
average= (float)sum /22;
cout<<"加權平均:"<<average<<endl;
system("pause");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int t[11] = {89,72,80,75,76,72,60,76,79,58,78};
int c[11] = {2,3,2,0,3,3,3,3,3,0,0,};
int sum = 0;
float average;
int i;
for ( i = 0; i < 11; i++ )
sum += t[i]*c[i];
int ctotal=0;
for (i=0;i<11;i++)
ctotal+=c[i];
average = (float)sum /ctotal;
char s[11][30]={
"GE0101A 國文 ",
"GE0102A 英文 ",
"GE0103A 中國通史 ",
"GE0105A 勞作教育 ",
"IM0004E 管理學 ",
"IM0041 計算機概論 ",
"IM0042 微積分(一) ",
"IM0043 經濟學(一) ",
"IM0044 會計學(一) ",
"ML01AA 軍訓 ",
"PE01AA 體育(大一) "
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<" "<<t[i]<<" "<<c[i]<<endl;
cout<<"加權平均:"<<average<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
char s[11][30]={
"GE0101A 國文 83 2",
"GE0102A 英文 71 3",
"GE0103A 中國通史 74 2",
"GE0105A 勞作教育 80 0",
"IM0004 管理學 72 3",
"IM0041 計算機概論 67 3",
"IM0042 微積分(一) 79 3",
"IM0043 經濟學(一) 75 3",
"IM0044 會計學(一) 82 3",
"ML01AA 軍訓 73 0",
"PE01AA 體育(大一) 78 0"
};
for (int i=0; i<11; i++)
cout<<i<<"\t"<<s[i]<<endl;
int t[11]={83,71,74,80,72,67,79,75,82,73,78};
int c[11]={2,3,2,0,3,3,3,3,3,0,0};
int sum=0;
float average;
int i;
for(i=0;i<11;i++)
sum=sum+t[i]*c[i];
average = (float)sum/22;
cout<<"總分:"<<sum<<endl;
cout<<"平均:"<<average<<endl;
system("Pause");
return 0;
}
#include <iostream>
#include<cstring>
using namespace std;
void test(void);
int main(){
test();
int a[6]={60,56,60,60,67,75};
int b[2]={63,60};
int c[3]={75,67,70};
int sum=0;
int e,f;
e=0;
for(f=0;f<6;f++)
e=e+a[f]*3;
int g,h;
g=0;
for(h=0;h<1;h++)
g=g+b[h]*2;
int i,j;
i=0;
for(j=0;j<2;j++)
i=i+c[j]*0;
float A;
sum=e+g+i;
A=sum/(6*3+1*2+2*0);
printf("學期加權平均=%.2f",A);
system("Pause");
}
void test(){
char a[11][70]={
"必修 GE0101A 丙 國文 2 63 " ,
"必修 GE0102A 丙 英文 3 60 " ,
"必修 GE0103A 丙 中國通史 2 60 " ,
"必修 GE0105A 丙 勞作教育 0 75 " ,
"必修 IM0004 丙 管理學 3 56 " ,
"必修 IM0041 丙 計算機概論 3 60 " ,
"必修 IM0042 丙 微積分(一) 3 60 " ,
"必修 IM0043 丙 經濟學(一) 3 67 " ,
"必修 IM0044 丙 會計學(一) 3 75 " ,
"必修 ML01AA 丙 軍訓 0 67 " ,
"必修 PE01AA 丙 體育(大一) 0 70 " ,
};
for (int i=0;i<11;i++)
cout<<a[i]<<endl;
}
#include<stdio.h>
#include<stdlib.h>
int main()
{
int t[12]={89,69,81,80,61,90,62,74,73,78,80,89};
int c[12]={0,1,2,2,2,3,3,3,3,3,3,0};
int sum=0;
int ctotal=0;
float average;
int i;
for(i=0;i<=11;i++)
{
sum=sum+t[i]*c[i];
}
for(i=0;i<=11;i++)
{
ctotal=ctotal+c[i];
}
char s[13][50]={
"課程名稱 分數 學分 ",
"操行 89 0 ",
"英文字彙與閱讀 69 1 ",
"公民社會概論 81 2 ",
"人類活動與地球環境變遷 80 2 ",
"基礎日文[一般] 61 2 ",
"資料結構 90 3 ",
"生產管理 62 3 ",
"資料庫管理系統 74 3 ",
"會計資訊系統 73 3 ",
"會計資訊系統 78 3 ",
"企業電子化 80 3 ",
"體育(韻律) 89 0 ",
};
for (int i=0; i<13; i++)
{
printf(s[i]);
printf("\n");
}
average=(float)sum/ctotal;
printf("\n");
printf("加權平均值=%5.2f\n學分數=%d\n" ,average ,ctotal);
system("pause");
return 0;
}
張貼留言