Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
46977d3
Created helloworld.cpp as first code file in codespree
SwastikNanda Sep 30, 2021
0271210
Create helloworld.cpp
SwastikNanda Sep 30, 2021
8724d25
Delete helloworld.cpp
SwastikNanda Sep 30, 2021
dfabb55
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 1, 2021
50e977a
Add files via upload
SwastikNanda Oct 4, 2021
3073d2e
Delete helloworld.cpp
SwastikNanda Oct 4, 2021
ddb9011
Add files via upload
SwastikNanda Oct 4, 2021
212ce8a
Delete fibonacci_till_n.cpp
SwastikNanda Oct 4, 2021
ab7311a
Delete print_all_prime_in_the_range.cpp
SwastikNanda Oct 4, 2021
3359d44
Delete print_Z.cpp
SwastikNanda Oct 4, 2021
0a4151f
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 4, 2021
a28ae19
Add files via upload
SwastikNanda Oct 4, 2021
4197127
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 6, 2021
a7584e0
2 programs
SwastikNanda Oct 6, 2021
7b6f749
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 20, 2021
3248dd9
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 21, 2021
cc19838
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 24, 2021
51caea4
Add files via upload
SwastikNanda Oct 24, 2021
085ecba
Update pattern6.cpp
SwastikNanda Oct 24, 2021
771691b
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Oct 27, 2021
2fc6024
Delete Web/SwastikNanda_SwastikNanda_2024IT1183_2/GettingStarted/Patt…
SwastikNanda Nov 15, 2021
c9db562
Add files via upload
SwastikNanda Nov 15, 2021
17a38ae
Add files via upload
SwastikNanda Nov 15, 2021
52bd08e
Delete pattern1.exe
SwastikNanda Nov 16, 2021
a233b9d
Delete pattern2.exe
SwastikNanda Nov 16, 2021
154173e
Delete pattern6.exe
SwastikNanda Nov 16, 2021
2ccc086
Delete pattern7.exe
SwastikNanda Nov 16, 2021
72ee03b
Delete pattern8.exe
SwastikNanda Nov 16, 2021
5ac2c7f
Delete pattern9.exe
SwastikNanda Nov 16, 2021
9b916ce
Merge branch 'InnogeeksOrganization:main' into main
SwastikNanda Nov 16, 2021
e625e1e
Add files via upload
SwastikNanda Nov 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// int b=1;
// for(int i=1;i<=((n/2)+1);i++)
// {
// for(int j=n-l;j>0;j--){ //commented code is working properly on VS code and online compilers but not on pepcoding site.
// for(int j=n-l;j>0;j--){ //this code is working properly on VS code and online compilers but not on pepcoding site.
// printf("* ");
// }
// for(int k=b;k>0;k--){
Expand Down Expand Up @@ -49,7 +49,7 @@ using namespace std;
int main(int argc, char **argv){
int n;
cin >> n;

int stars = n / 2 + 1;
int spaces = 1;
for (int i = 1; i <= n; i++){
Expand All @@ -74,4 +74,4 @@ int main(int argc, char **argv){
}
}
return 0;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include<iostream>
using namespace std;
int digFreq(int n, int d) {
int temp=0;
int count=0;
while(n!=0){
temp=n%10;
n=n/10;
if(temp==d){
count++;
}
}
return count;
}
int main() {
int n, d;
cin >> n >> d;
int res = digFreq(n, d);
cout << res << endl;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include<iostream>
using namespace std;


int main(){
int n;
cin>>n;
int arr[n];
for(int i=0;i<n;i++){
cin>>arr[i];
}
int d,count=0;
cin>>d;
for(int i=0;i<n;i++){
if(arr[i]==d){
cout<<i;
break;
}
count++;
}
if(count==n){
cout<<"-1";
}

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include<iostream>
using namespace std;

int main(){
int n;
cin>>n;
int arr[n];
int max,min;
max=0;
for(int i=0;i<n;i++){
cin>>arr[i];
if(i==0){min=arr[i];max=arr[i];}
if(arr[i]>max){max=arr[i];}
if(arr[i]<min){min=arr[i];}
}
cout<<max-min;

return 0;
}