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> | |
int main() | |
{ | |
// 4ete 4isla do sre6tane na 0 i namira max 4islo, koeto ne se deli na 3. | |
int n, max = -1000; | |
do { | |
printf("vyvedete chislo: "); | |
scanf("%d", &n); | |
if (n % 3 != 0 && n > max) { |
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> | |
int main() | |
{ | |
// която чете числа до срещане на 0 и намира колко пъти поредното въведено число е по голямо от предходното | |
// ВХ: 20,15,7,10,13,4,19,0 -> изх.3 | |
int curr = 0, prev = 0, br=0; | |
printf("vyvedete chislo: "); | |
scanf("%d", &curr); | |
while (curr != 0){ | |
if (curr > prev && prev != 0) { |
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
/* | |
* File: main.c | |
* Author: pp | |
* | |
* Created on June 27, 2013, 5:29 PM | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/unistd.h> |
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
class Sample_Model_Observer | |
{ | |
protected $colToAdd = 'colname'; | |
/** | |
* @param Varien_Event_Observer $observer | |
*/ | |
public function urapidflow_profile_action( $observer ) | |
{ | |
$action = $observer->getData( 'action' ); | |
$profile = $observer->getData( 'profile' ); |
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 static void main(String[] args) { | |
int noOfRows = 1234; | |
for (int i = 0; i < noOfRows; i++) { | |
if (i > 0 && i % 18 == 0) { | |
System.out.println(1); | |
} | |
} | |
} |
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 <iostream> | |
using namespace std; | |
int main(int argc, const char * argv[]) { | |
int N, t, a,b,c; | |
int Nmax = 1000000; // po uslovie N ne moje da e poveche ot tova chislo | |
int tMax = 10000; // vs chislo sled N ne moje da e poveche ot tova | |
cin >> N; | |
cout << "N is: " << N << "\n"; |
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 <iostream> | |
#include <string> | |
#include <math.h> | |
using namespace std; | |
string decimalToBinary(unsigned int a) | |
{ | |
string b = ""; | |
if (a == 0) |
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
void minMax(int arr[],int size) { | |
int min, max, minIdx, maxIdx; | |
for (int i = 0; i < size; i++) | |
{ | |
if (i == 0) { | |
// при първото завъртане, слагаме стойността на мин и макс като стойността на | |
// първия елемент на масива и прескачаме на следващото завъртане | |
min = max = arr[i]; | |
minIdx = maxIdx = 0; |
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 <iostream> | |
#include <string> | |
using namespace std; | |
void toBin(int n) | |
{ | |
if (n == 0 || n == 1) | |
{ | |
cout << n; | |
return; |
OlderNewer