[问题1]假定白色和黑色的值,分别为全1和全0,则由图B、图D和图E,得到图F的效果 发布时间:2017-04-14 02:04 │ 来源:www.tikuol.com 题型:问答题 问题: [问题1]假定白色和黑色的值,分别为全1和全0,则由图B、图D和图E,得到图F的效果,需要进行哪些逻辑运算操作
题型:问答题 [说明] ①定义私有数据成员code、english分别用于表示考生的编号、英语成绩,它们都是int型的数据。 ②完成成员函数void Student::inputinformation()的定义,该函数用于用户输入一个考生对象的信息,输入格式如下: 输入编号: 英语成绩: 计算机成绩: ③利用已实现的类Student的成员函数,完成函数void firstname(Student *A[],int uum)的定义,该函数根据考生信息A[],输出num个考生中总分最高者的编号及其相应的总分,在此不考虑总分相同的情况。 源程序文件test1.cpp清单如下: #include < iostream. h > class Student (1) int computer; int total; public void getinformation( ); void computesum( ); int getcode( ); int gettotalscore( ); ~Student( ); }; void Student: :getinformation( ) { (2) cout <<"英语成绩:"; cin> >english; cout <<"计算机成绩:"; cin > > computer; void Student:: computesum ( ) total = english + computer; cout <<"编号" << code <<"总分:" <<total << endl; int Student::getcode( ) return code; } int Student:: gettotalscore ( ) { return total; } void firstname(Student * A[] ,int num) { (3) tempsum = ( * A[0] ). gettotalscore( ); for( int i=1; i <num; i++) {if ( ( ( * A[i] ). gettotalscore( ) ) > tempsum){ tempcode = ( * A[i] ). getcode( ); tempsum = ( * A[i] ). gettotalscore( ); }}cout <<"总分最高者--" << tempcode <<":" << tempsum <<endl; }void main( ) { Student * A[3]; int i,n =3 for(i=0;i<n;i ++)A[i] = new Student;A[i] -> getinformation( ) for(i=0;i<n;i ++) {A[i] -> computesum( ) firstname ( A,3 ); } 查看答案
题型:问答题 有下列程序: #include<stdio.h> #include<stdlib.h> int fun(int n) int*p; p=(int*)malloc(sizeof(int)); *p=n;return*p: main() int a; a=fun(10);printf("%d\n",a+fun(10)); 程序的运行结果是( )。A.0B.10C.20D.出错 查看答案
题型:问答题 以下情形中,中国证监会可以对有关责任人员采取终身的证券市场禁入措施的有()A.从事保荐业务,负有法定职责的人员,故意不履行法律、行政法规或者中国证监会规定的义务,并造成特别严重后果的B.严重违反法律、行政法规或者中国证监会有关规定,构成犯罪的C.因违反法律、行政法规或者中国证监会有关规定,5年内被中国证监会给予1警告2次罚款处罚的D.因违反法律、行政法规或者中国证监会有关规定,5年内曾经被采取证券市场禁入措施的 查看答案