Changes to be committed:
deleted: proglabs/lab5/.1.c.swo deleted: proglabs/lab5/.1.c.swp deleted: proglabs/lab5/1.c~ deleted: proglabs/lab5/10 deleted: proglabs/lab5/11 deleted: proglabs/lab5/12 deleted: proglabs/lab5/13 deleted: proglabs/lab5/14 deleted: proglabs/lab5/15 deleted: proglabs/lab5/15.c~ deleted: proglabs/lab5/16 deleted: proglabs/lab5/17 deleted: proglabs/lab5/18 deleted: proglabs/lab5/2 deleted: proglabs/lab5/3-1 deleted: proglabs/lab5/3-2 deleted: proglabs/lab5/4 deleted: proglabs/lab5/5 deleted: proglabs/lab5/5.c~ deleted: proglabs/lab5/6 deleted: proglabs/lab5/7 deleted: proglabs/lab5/a.out renamed: proglabs/lab5/8 -> proglabs/lab6/3 modified: proglabs/lab6/3.c new file: proglabs/lab6/3.c~ renamed: proglabs/lab5/1 -> proglabs/lab6/6 modified: proglabs/lab6/6.c new file: proglabs/lab6/6.c~ renamed: proglabs/lab5/9 -> proglabs/lab6/9 modified: proglabs/lab6/9.c new file: proglabs/lab6/9.c~ new file: proglabs/lab7-8/1.c new file: proglabs/lab7-8/2.c new file: proglabs/lab7-8/3.c new file: proglabs/lab7-8/4.c
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
double min(double x, double y);
|
||||
|
||||
int main(){
|
||||
double x,y;
|
||||
printf("Enter: num1 num2\nEnter: ");
|
||||
scanf("%lf %lf",&x,&y);
|
||||
printf("lower: %lf\n",min(x,y));
|
||||
return 0;
|
||||
}
|
||||
|
||||
double min(double x, double y){
|
||||
return ((x>y)?x:y);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#include <stdio.h>
|
||||
void min(char ch, char i, char j);
|
||||
|
||||
int main(){
|
||||
char ch, i, j;
|
||||
|
||||
printf("Enter: char i j\nEnter: ");
|
||||
scanf(" %c %c %c",&ch,&i,&j);
|
||||
min(ch,i,j);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void min(char ch, char i, char j){
|
||||
int c = i;
|
||||
for(;i<=j;i++){printf("%c\t",i);}
|
||||
printf("\n");
|
||||
i = c;
|
||||
for(;i<=j;i++){printf("%c\t",ch);}
|
||||
printf("\n");
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#include <stdio.h>
|
||||
void table(char ch, int a, int b);
|
||||
|
||||
int main(){
|
||||
char ch;
|
||||
int a,b;
|
||||
printf("Enter: Char num1 num2\nEnter: ");
|
||||
scanf(" %c %d %d",&ch,&a,&b);
|
||||
table(ch,a,b);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void table(char ch, int a, int b){
|
||||
//for(int i = 0;i<=a;i++){printf("%d",i);}
|
||||
printf("\n");
|
||||
for(int i = 1;i<=b;i++){
|
||||
//printf("%d",i);
|
||||
for(int x = 1;x<=a;x++){printf("%c",ch);}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
double garmony(double a,double b);
|
||||
|
||||
int main(){
|
||||
double a, b;
|
||||
printf("Enter: num1 num2\nEnter: ");
|
||||
scanf(" %lf %lf",&a,&b);
|
||||
printf("garmony = %lf",garmony(a,b));
|
||||
return 0;
|
||||
}
|
||||
|
||||
double garmony(double a, double b){
|
||||
double x;
|
||||
a *= -1;
|
||||
b *= -1;
|
||||
x = (((a+b)/2)*-1);
|
||||
return x;
|
||||
}
|
||||
Reference in New Issue
Block a user