This file contains hidden or 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 <stdlib.h> | |
#define NROWS 10 | |
#define NCOLS 7 | |
float col_ave(int x[NROWS][NCOLS], int col) { | |
float average; | |
int i, total = 0; | |
for (i = 0; i < NROWS; i++) { |
This file contains hidden or 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
@interface ViewControllerStudentsList () | |
@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext; | |
@property (strong, nonatomic) UIManagedDocument *document; | |
@property (nonatomic) NSInteger studentCount; | |
@property (strong, nonatomic) NSMutableArray *studentList; | |
@property (strong, nonatomic) NSMutableDictionary *studentPortraits; | |
@end |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
typedef struct{ |
This file contains hidden or 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 <stdlib.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
typedef struct{ |
This file contains hidden or 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> | |
int main() { | |
int inc = 0, dec = 0; | |
// incrementing a number | |
printf("inc = %d\n", inc); | |
inc++; | |
printf("inc (po inc++ operacijos) = %d\n", inc); | |
This file contains hidden or 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
void Get (struct KNYGA a[], int *i) | |
{ | |
int t; | |
for(t=0; t<*i; t++) | |
{ | |
strcpy(a[t].pavadinimas, a[t+1].pavadinimas); | |
strcpy(a[t].autorius, a[t+1].autorius); | |
a[t].puslapiu = a[t+1].puslapiu; | |
a[t].metai = a[t+1].metai; | |
a[t].versta = a[t+1].versta; |
This file contains hidden or 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
void Print (struct KNYGA a[], int *i) { | |
// a - "struct KNYGA" tipo masyvas | |
// i - masyve "a" esanciu elementu/eiluciu skaicius | |
// k - dabartines spausdinamos eilutes/elemento skaicius | |
int k; | |
for (k=0; k<i; k++){ | |
// for - ciklas, kuris vyksta tol, kol dabartinis elementas "k" | |
// nevirsyja viso masyvo elementu skaiciaus | |
This file contains hidden or 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
/* Dovile Mikenaite, Ekonometrija, 2 grupe : | |
2. Su pasirinktais įrašais realizuoti ADT steko operacijas dinaminio dvikrypčio sąrašo pagrindu. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
//#include <conio.h> | |
//typedef int bool; |
This file contains hidden or 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 <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
long long powSafe( | |
long base, | |
int exponent, | |
long module | |
) { | |
long long result = 1; |
This file contains hidden or 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 <time.h> | |
int main() { | |
// time it | |
clock_t cstart = clock(); | |
clock_t cend = 0; | |
int i, j, k; | |
int sum = 0; |