Update appNew update is available. Click here to update.
About
I am a 7th-semester CSE student pursuing my B.Tech degree at Gyan Ganga Institute of Technology and Sciences. I am a detail-oriented person with a passion for software engineering and programming. I h...
Gyan Ganga Institute of Technology & Sciences 2024
C++ - Default language
My Stats
EXP gained
yellow-spark
121203
Level
9 (Sage)
Community stats
Discussions
0
Upvotes
0
Know more
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
Weekend contest rating
Contest attended
Problems solved
2021 2023
Better than %
2100
Total problems solved
1943
Easy
103
Moderate
45
Hard
9
Ninja
Jan Jan Feb Feb Mar Mar Apr Apr May May Jun Jun Jul Jul Aug Aug Sep Sep Oct Oct Nov Nov Dec Dec

Current streak:

95 days

Longest streak:

95 days

Less

More

Achievements
10
Ronin
Topics
Greedy
Linked List
Sorting
+ 7 more
5
Samurai
Topics
Arrays
Tries
Strings
+ 2 more
1
Sensei
Topics
SQL
13
Sensei
Guided path
Oops in java
ChatGPT
+ 11 more

College monthly badge

2 Times topper

562 average partcipants
Discussions
code for sum of even numbers till n
Interview problems

#include <iostream>

using namespace std;

 

int main() {

    //Write your code here

int n;

cin>>n;

int sum=0;

for(int i=0;i<=n;i++){

    if(i%2==0){

        sum=sum+i;

    }

}

cout<<sum;

    return 0;

}

profile
Shruti84
Published On 11-Jul-2023
51 views
0 replies
1 upvotes
Swapping using pointers in cpp
Interview problems

void swapNumber(int &a, int &b) {

    // Write your code here.

        int *a1=&a;

        int *b1=&b;

        int temp=*a1;

        *a1=*b1;

        *b1=temp;

 

}

profile
Shruti84
Published On 07-Jul-2023
106 views
0 replies
0 upvotes