Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions fibo.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Стайлгайду Вы не следуете. Программа без исправлений работает не правильно. 5 баллов.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

#include <stdio.h>

int main()
{
int f1 =0;
int f2 =1;
int sum = 0;
int next;

while(f2<1000000){
if(f2 % 2 == 0)
sum =+ f2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sum =+ f2;
sum += f2;

Оператора =+ не существует.

next = f1 + f2 ;
f1 = f2;
f2 = next;
}


printf("%d\n",sum);

return 0;
}
8 changes: 8 additions & 0 deletions src/hello.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А зачем этот файл здесь?

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <stdio.h>
int main()
{
printf("Hello, world!\n");


return 0;
}