This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
void func (int a[],int SIZE){ | |
int i=0; | |
for(;i<SIZE;i++){ | |
if(a[i]<0) | |
a[i]=0; | |
printf("%d\n",a[i]); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
void del (char *start,char WORD){ | |
int i=0,j=0,k=0; | |
for(;start[i]!='\0';i++){ | |
if (start[i]==WORD){ | |
for(k=i;start[k]!='\0';k++) | |
start[k]=start[k+1]; | |
i--; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
double sum (int n){ | |
int i=0; double h=0; | |
for(;i<=n;i++) | |
h+=i; | |
return h; | |
} | |
int main (){ | |
int x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
double is3 (int n){ | |
return n%3==0; | |
} | |
int main (){ | |
double x; | |
double f; | |
scanf("%lf",&x); | |
f=is3(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
int countChet (int n, int y){ | |
int i=0,h=0,max,min; | |
if(n>y){ | |
max=n; min=y; | |
} else { | |
max=y; min=n; | |
} | |
for(i=min;i<=max;i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<conio.h> | |
#include<stdio.h> | |
#include <string.h> | |
int main(){ | |
char str[100], repeat; | |
gets(str); | |
int i=0, count = 1, k=0, tempCount =0, length=strlen(str); | |
repeat = str[0]; | |
for (i=1;str[i]!='\0';i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#define MAXSIZ 10 | |
typedef struct { | |
int data[MAXSIZ]; | |
int top; | |
} queue_t; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int lerp(float start, float target, float duration, float timeSinceStart){ | |
float value = start; | |
if(timeSinceStart>=0.0f && timeSinceStart < duration){ | |
float range = target - start; | |
float percent =timeSinceStart / duration; | |
value = start + range * percent; | |
} | |
else if(timeSinceStart>=duration) | |
value = target; | |
return Math.round(value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int a = 0; | |
while((a=5) != 0 && 5 > 4){ | |
System.out.println("Hello! It's a loop."); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var element = document.getElementById("im"); | |
var currentPosition = element.offsetTop; //Получаем текущее положение блока, который будет выплывать | |
smoothAnimation = requestAnimationFrame(function anim(time) { | |
currentPosition++; | |
element.style.top = currentPosition +"px"; | |
smoothAnimation = requestAnimationFrame(anim); // The animation would not stop after 1.5 sec if delete smoothAnimation in this line because the fucntion reference changes every time it's called | |
}); | |
setTimeout(function(){ |
OlderNewer