Channel address:
Categories:
Technologies
Language: English
Subscribers:
14.46K
Description from channel
Coding channel @codewithvirus. 👈
Main group @avirustech 👈
Accenture @Accenturavirustech 👈
IBM. @IBMavirustech 👈
Tech Mahindra. @TechMavirustech 👈
Ratings & Reviews
Reviews can be left only by registered users. All reviews are moderated by admins.
5 stars
0
4 stars
0
3 stars
1
2 stars
1
1 stars
0
The latest Messages
2023-07-24 15:36:39
#include
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
int k;
cin >> k;
sort(arr, arr + n);
cout << arr[k - 1];
}
C++
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
396 viewsedited 12:36
2023-07-24 15:05:25
#include
using namespace std;
int main()
{
int n;
cin >> n;
int even = 0, odd = 0;
while (n > 0)
{
if ((n % 10) % 2 == 0)
even += n % 10;
else
odd += n % 10;
n = n / 10;
}
cout << even * odd;
}
C++
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
326 viewsedited 12:05
2023-07-24 14:24:38
#include
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
int k, m;
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
cin >> k >> m;
for (int i = 0; i < n; i++)
{
if (arr[i] >= k && arr[i] <= m)
cout << arr[i] << " ";
}
return 0;
}
C++
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
315 viewsedited 11:24
2023-07-24 13:20:38
#include
using namespace std;
int main()
{
int n;
cin >> n;
int arr[n];
for (int i = 0; i < n; i++)
{
cin >> arr[i];
}
sort(arr, arr + n);
cout << arr[n - 2] + arr[n - 1];
return 0;
}
C++
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
336 viewsedited 10:20
2023-07-24 13:11:09
#include
using namespace std;
int main()
{
string s;
cin >> s;
int ans = 0;
map m;
for (int i = 0; i < s.size(); i++)
{
m[s[i]]++;
}
for (auto x : m)
{
if (x.second == 1)
ans++;
}
cout << ans;
return 0;
}
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
308 viewsedited 10:11
2023-07-24 13:05:29
#include
using namespace std;
bool prime(int num)
{
if (num <= 1)
return false;
for (int i = 2; i * i <= num; ++i)
{
if (num % i == 0)
return false;
}
return true;
}
int main()
{
int n;
cin >> n;
int ans = 0;
while (n > 0)
{
if (prime(n % 10))
ans += n % 10;
n = n / 10;
}
cout << ans;
return 0;
}
c++
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
289 viewsedited 10:05
2023-07-24 12:37:59
#include
using namespace std;
int main()
{
string s;
cin >> s;
int n;
cin >> n;
for (int i = n; i < s.size() + n; i++)
{
cout << s[i % s.size()];
}
return 0;
}
c++
https://bit.ly/codewithanusha
325 viewsedited 09:37
2023-07-24 11:55:31
TechM Campus 2024
Print an integer representing the number of desktop products among the given sales data.
Python
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
363 viewsedited 08:55
2023-07-24 11:42:17
#include
using namespace std;
bool prime(int num)
{
if (num <= 1)
return false;
for (int i = 2; i * i <= num; ++i)
{
if (num % i == 0)
return false;
}
return true;
}
int main()
{
int l, r;
cin >> l >> r;
int ans = 0;
for (int i = l; i <= r; i++)
{
if (prime(abs(i)))
{
ans += i;
}
}
cout << ans;
return 0;
}
TechM Campus 2024
sumPrime
Python
@TechMavirustech
@TechMavirustech
@TechMavirustech
@TechMavirustech
https://bit.ly/codewithanusha
413 viewsedited 08:42
2023-07-24 11:24:19
Send me your coding questions guys
412 views08:24