Answers for "birthday cake candles hackerrank solution"

0

birthday cake candles hackerrank solution

#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;}
Posted by: Guest on August-04-2021

Code answers related to "birthday cake candles hackerrank solution"

Browse Popular Code Answers by Language