noooo
This commit is contained in:
1 parent
045d7367a8
commit
8aa73bde5e
10 files changed
+649
-47
No files matched your search
+13
-3
@@ -6,7 +6,7 @@ typedef struct
|
||||
int imag;
|
||||
} ldaComplex;
|
||||
|
||||
void print(ldaComplex* lda)
|
||||
void print(ldaComplex *lda)
|
||||
{
|
||||
printf("%d + %di", lda->real, lda->imag);
|
||||
}
|
||||
@@ -30,8 +30,18 @@ int main(int argc, char const *argv[])
|
||||
ldaComplex addRes = add(lda, lda2);
|
||||
ldaComplex multiRes = multiply(lda, lda2);
|
||||
|
||||
printf("("); print(&lda); printf(") + ("); print(&lda2); printf(") = "); print(&addRes);
|
||||
printf("\n("); print(&lda); printf(") * ("); print(&lda2); printf(") = "); print(&multiRes);
|
||||
printf("(");
|
||||
print(&lda);
|
||||
printf(") + (");
|
||||
print(&lda2);
|
||||
printf(") = ");
|
||||
print(&addRes);
|
||||
printf("\n(");
|
||||
print(&lda);
|
||||
printf(") * (");
|
||||
print(&lda2);
|
||||
printf(") = ");
|
||||
print(&multiRes);
|
||||
return 0;
|
||||
}
|
||||
// ass
|
||||
+7
-4
@@ -1,10 +1,13 @@
|
||||
void findMax(int *max, int a) {
|
||||
if (a > *max) *max = a;
|
||||
void findMax(int *max, int a)
|
||||
{
|
||||
if (a > *max)
|
||||
*max = a;
|
||||
};
|
||||
|
||||
#include <stdio.h>
|
||||
int main(){
|
||||
int c = 176;
|
||||
int main()
|
||||
{
|
||||
int c = 176;
|
||||
int f = 10;
|
||||
findMax(&f, c);
|
||||
printf("%d, %d", c, f);
|
||||
|
||||
+4
-4
@@ -10,13 +10,13 @@ int log10intint(int n)
|
||||
{
|
||||
a *= 10;
|
||||
if (n - a < 0)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
};
|
||||
int ten_to_the(int i)
|
||||
{ if (i < 0) return 0;
|
||||
{
|
||||
if (i < 0)
|
||||
return 0;
|
||||
int ret = 1;
|
||||
while (i-- > 0)
|
||||
ret *= 10;
|
||||
@@ -37,7 +37,7 @@ int special_swap(int number)
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
|
||||
printf("%d\n", special_swap(142425));
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user