Compare commits
No commits in common. 'master' and 'cp' have entirely different histories.
@ -1,40 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cp.h>
|
||||
#include <minus.h>
|
||||
#include <pzd.h>
|
||||
#include <yx.h>
|
||||
int main(){
|
||||
int a,op1,op2;
|
||||
while(1){
|
||||
printf("----------------- Menu -------------------\n");
|
||||
printf("1.plus 2.minus 3.multiple 4.divide");
|
||||
printf("------------------------------------------\n");
|
||||
printf("Please choose your operator:");
|
||||
scanf("%d",&a);
|
||||
if(a==0) break;
|
||||
printf("Please input op1:");
|
||||
scanf("%d",&op1);
|
||||
printf("Please input op2:");
|
||||
scanf("%d",&op2);
|
||||
switch(a){
|
||||
case 1:
|
||||
add(op1,op2);//
|
||||
break;
|
||||
case 2:
|
||||
minus(op1,op2);//
|
||||
break;
|
||||
case 3:
|
||||
multi(op1,op2);//
|
||||
break;
|
||||
case 4:
|
||||
division(op1,op2);//
|
||||
break;
|
||||
default:
|
||||
printf("Please input correct number.\n");
|
||||
}
|
||||
}
|
||||
printf("Have a good time.");
|
||||
|
||||
return 1 ;
|
||||
}
|
||||
@ -1,8 +0,0 @@
|
||||
include<stdio.h>
|
||||
float minus(float a,float b);
|
||||
float minus(float a,float b)
|
||||
{
|
||||
a = a - b;
|
||||
printf("%d - %d",a,b);
|
||||
return a;
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#ifndef GRAPHICS_H
|
||||
|
||||
#define GRAPHICS_H
|
||||
|
||||
float multi(float a,float b)
|
||||
{ float c;
|
||||
c=a*b;
|
||||
printf("c=%f”,c);
|
||||
return c;
|
||||
}
|
||||
Loading…
Reference in new issue