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
#list folders | |
for folder in * | |
do | |
ls $folder | |
done | |
cd /home/uczelnia.local/ekoseci1/www/operating/class4/folder1 | |
for i in 1 2 | |
do | |
ln -s image$i.jpeg softimage$i.jpeg | |
done |
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> | |
void swap(float *p1,float *p2){ | |
float tmp; | |
tmp=*p1; | |
*p1=*p2; | |
*p2=tmp; | |
printf("p1=%f , p2=%f\n",p1,p2); | |
} |
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> | |
float minm(float a1[],int size); | |
int main() | |
{ | |
float a1[]={2.5,5.7,1.2,2.1,4.3}; | |
float *p; | |
p=a1; | |
while(p<a1+sizeof(a1)/sizeof(float)) |
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> | |
unsigned scat(char *s, char *s2) | |
{ | |
int i,j; | |
for(i=0;s[i]!=0; i++); | |
s[i++]=32; | |
for(j=0;s2[j]!=0;j++){ | |
s[i]=s2[j]; | |
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
#include <stdio.h> | |
unsigned scat(char *s, char *s2) | |
{ | |
int i,j; | |
for(i=0;s[i]!=0; i++); | |
s[i++]=32; | |
for(j=0;s2[j]!=0;j++){ | |
s[i]=s2[j]; | |
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
x = int(eval(input("x = ") ) ) | |
k = int(input("k = ")) | |
print(k , "position digit = ", (abs(x) // 10 ** k) % 10) | |
print(k , "position digit = ", (abs(x) // 10 ** k) % 2) | |
print ("length of the decimal number = ", len(str(x))) | |
print ("length of the binary number = ", len(str(bin(abs(x))))-2, ) |
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
import math | |
print('TOrus calculator\n') | |
R=float(input('major radius R = ')) | |
r=float(input('minor radius r = ')) | |
area = (2*math.pi*R)*(2*math.pi*r) | |
vol = (math.pi*r**2)*(2*math.pi*R) | |
print("area = ",area) | |
print("volume = ",vol) |
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 <iostream> | |
#include <string> | |
using namespace std; | |
/* run this program using the console pauser or add your own getch, system("pause") or input loop */ | |
/* | |
int length ( char s [] ){ | |
int i=0; | |
for(; s[i]!='\0';i++); | |
return 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
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
/* run this program using the console pauser or add your own getch, system("pause") or input loop */ | |
int main(int argc, char** argv) { | |
//int tri, squ, rect, rho, para, tra, pent, hex, oct; | |
int i, o=0, d, k; | |
float sum, a, b, c, z; |
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 <iostream> | |
using namespace std; | |
/* run this program using the console pauser or add your own getch, system("pause") or input loop */ | |
int main(int argc, char** argv) { | |
int BS,NH,HR,OV,CP,x,y,a,k; | |
cout<<"enter how many hours you worked this week:"; | |
cin>>NH; | |
cout<<endl; | |
cout<<"enter hours rate: "; |