๐—–๐—ฆ ๐—”๐—น๐—ด๐—ผ ๐Ÿ’ป ๐ŸŒ ใ€Ž๐—–๐—ผ๐—บ๐—ฝ๐—ฒ๐˜๐—ถ๐˜๐—ถ๐˜ƒ๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ดใ€
9.65K subscribers
5.62K photos
3 videos
95 files
10.7K links
๐ŸšฉMain Group - @SuperExams
๐Ÿ“Job Updates - @FresherEarth

๐Ÿ”ฐAuthentic Coding Solutions(with Outputs)
โš ๏ธDaily Job Updates
โš ๏ธHackathon Updates & Solutions

Buy ads: https://telega.io/c/cs_algo
Download Telegram
#include <assert.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*Birthday Cake Candles Code in C*/
int main() {
int i;
int n;
int max = 0;
scanf("%d", & n);
int a[n];
int count = 0;
for (i = 1; i <= n; i++) {
scanf("%d", & a[i]);
if (max < a[i])
max = a[i];
}
for (i = 1; i <= n; i++)
if (a[i] == max)
count++;
printf("%d", count);
return 0;
}
Candles code in C
int a[]=new int[N];

while(true)
{
int z=0;
for(int i=1;i<N;i++)
{
a[i]=i+1;
}

boolean b=true;
for(int i=0;i<N && i!=Integer.MAX_VALUE;i++)
{
if(b)
{
a[i]=Integer.MAX_VALUE;
b=false;
}
else
b=true;

if(a[i]!=Integer.MAX_VALUE)
z++;
}
if(z==1)
return z;
}


โœ”๏ธโœ”๏ธ
Block code