update
This commit is contained in:
parent
2992f4f408
commit
4f46de8d00
3330 changed files with 394553 additions and 76939 deletions
27
.config/Code/User/History/57898c00/57FG.cpp
Normal file
27
.config/Code/User/History/57898c00/57FG.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
27
.config/Code/User/History/57898c00/7L0f.cpp
Normal file
27
.config/Code/User/History/57898c00/7L0f.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b -= a;
|
||||
a += b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
20
.config/Code/User/History/57898c00/Fpm3.cpp
Normal file
20
.config/Code/User/History/57898c00/Fpm3.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
T temp = a;
|
||||
a = b;
|
||||
b = temp;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
swapValues<int>(1, 2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
18
.config/Code/User/History/57898c00/GDx4.cpp
Normal file
18
.config/Code/User/History/57898c00/GDx4.cpp
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
20
.config/Code/User/History/57898c00/Hzrk.cpp
Normal file
20
.config/Code/User/History/57898c00/Hzrk.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
T temp = a;
|
||||
a = b;
|
||||
b = temp;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
27
.config/Code/User/History/57898c00/OAWQ.cpp
Normal file
27
.config/Code/User/History/57898c00/OAWQ.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a = a + b;
|
||||
b = a + b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
30
.config/Code/User/History/57898c00/PIym.cpp
Normal file
30
.config/Code/User/History/57898c00/PIym.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
|
||||
swapValues<int>(a, b);
|
||||
swapValues(c, d);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
32
.config/Code/User/History/57898c00/QfIB.cpp
Normal file
32
.config/Code/User/History/57898c00/QfIB.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
|
||||
|
||||
swapValues(a, b);
|
||||
swapValues(c, d);
|
||||
|
||||
cout<<a<<"\n"<<b<<endl;
|
||||
cout<<c<<"\n"<<d<<endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
15
.config/Code/User/History/57898c00/RrwQ.cpp
Normal file
15
.config/Code/User/History/57898c00/RrwQ.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
int main(){
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
25
.config/Code/User/History/57898c00/V294.cpp
Normal file
25
.config/Code/User/History/57898c00/V294.cpp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a = a + b;
|
||||
b = a + b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
35
.config/Code/User/History/57898c00/WNq7.cpp
Normal file
35
.config/Code/User/History/57898c00/WNq7.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
double e = 5.5;
|
||||
double f = 7.5;
|
||||
|
||||
swapValues(a, b);
|
||||
swapValues(c, d);
|
||||
swapValues(e, f);
|
||||
|
||||
cout<<a<<"\n"<<b<<endl;
|
||||
cout<<c<<"\n"<<d<<endl;
|
||||
cout<<e<<"\n"<<f<<endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
1
.config/Code/User/History/57898c00/entries.json
Normal file
1
.config/Code/User/History/57898c00/entries.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"version":1,"resource":"file:///home/rafayahmad/Stuff/Coding/C%2B%2B/DS/lab2/task1.cpp","entries":[{"id":"RrwQ.cpp","timestamp":1725271343281},{"id":"GDx4.cpp","timestamp":1725271389234},{"id":"Hzrk.cpp","timestamp":1725271416764},{"id":"Fpm3.cpp","timestamp":1725271475370},{"id":"fzo3.cpp","timestamp":1725271492810},{"id":"vMLU.cpp","timestamp":1725271505330},{"id":"kW0y.cpp","timestamp":1725271530707},{"id":"V294.cpp","timestamp":1725271608497},{"id":"OAWQ.cpp","timestamp":1725271620647},{"id":"p35J.cpp","timestamp":1725271674141},{"id":"7L0f.cpp","timestamp":1725271694897},{"id":"nnYy.cpp","timestamp":1725271755948},{"id":"57FG.cpp","timestamp":1725271791551},{"id":"PIym.cpp","timestamp":1725271822071},{"id":"s34k.cpp","timestamp":1725271841771},{"id":"gbb2.cpp","timestamp":1725271853911},{"id":"r71y.cpp","timestamp":1725271933249},{"id":"QfIB.cpp","timestamp":1725272013346},{"id":"WNq7.cpp","timestamp":1725272062516}]}
|
||||
22
.config/Code/User/History/57898c00/fzo3.cpp
Normal file
22
.config/Code/User/History/57898c00/fzo3.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a = b;
|
||||
b = temp;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
31
.config/Code/User/History/57898c00/gbb2.cpp
Normal file
31
.config/Code/User/History/57898c00/gbb2.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
|
||||
swapValues(a, b);
|
||||
swapValues(c, d);
|
||||
|
||||
cout<<a<<"\n"<<b<<endl;
|
||||
cout<<c<<"\n"<<d<<endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
23
.config/Code/User/History/57898c00/kW0y.cpp
Normal file
23
.config/Code/User/History/57898c00/kW0y.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a = a + b;
|
||||
b = a + b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
27
.config/Code/User/History/57898c00/nnYy.cpp
Normal file
27
.config/Code/User/History/57898c00/nnYy.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a += b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
27
.config/Code/User/History/57898c00/p35J.cpp
Normal file
27
.config/Code/User/History/57898c00/p35J.cpp
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b -= a;
|
||||
a += b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
swapValues<int>(a, b);
|
||||
|
||||
cout<<a<<"\n"<<b;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
31
.config/Code/User/History/57898c00/r71y.cpp
Normal file
31
.config/Code/User/History/57898c00/r71y.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
|
||||
swapValues(a, b);
|
||||
swapValues(c, d);
|
||||
|
||||
cout<<a<<"\n"<<b<<endl;
|
||||
cout<<c<<"\n"<<d<<endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
31
.config/Code/User/History/57898c00/s34k.cpp
Normal file
31
.config/Code/User/History/57898c00/s34k.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
a += b;
|
||||
b = a - b;
|
||||
a = a - b;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
char c = 'a';
|
||||
char d = 'e';
|
||||
|
||||
swapValues<int>(a, b);
|
||||
swapValues(c, d);
|
||||
|
||||
cout<<a<<"\n"<<b<<endl;
|
||||
cout<<c<<"\n"<<d<<endl;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
23
.config/Code/User/History/57898c00/vMLU.cpp
Normal file
23
.config/Code/User/History/57898c00/vMLU.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
Rafay Ahmad
|
||||
23I-2526
|
||||
*/
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
template <class T>
|
||||
void swapValues(T& a, T& b){
|
||||
T temp = a;
|
||||
a = b;
|
||||
b = temp;
|
||||
}
|
||||
|
||||
int main(){
|
||||
|
||||
int a = 5;
|
||||
int b = 3;
|
||||
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue