Exam
Exam
} else if (N % 3 == 0) {
response = "Fizz"
} else if (N % 5 ==0) {
response = "Buzz";
} else {
sprintf(response, "%d", N);
}
return response;
}
#include<ctype.h>
#include<string.h>
char * accumulate_chars( char * string ) {
int n=strlen(string);
int reslen= n *(n+1)/2;
if(res==NULL){
return NULL;
}
int indx=0;
for(int i=0;i<n;i++){
res[indx++]=toupper(string[i]);
for(int j=0;j<1;j++){
res[indx++]=tolower(string[i]);
}
if(i<n-1){
res[indx++]=' ';
}
}
res[indx]='\0';
return res;
}
#include<ctype.h>
char * accumulate_chars( char *string ) {
int i,j,len,o;
len = strlen(string);
o = (len*(len+1))/2;
int m = o*3;
char *out = malloc(sizeof(char)*m);
int idx = 0;
int c=1;
for(int i=0;i<len;i++){
char curr = toupper(string[i]);
out[idx++]=curr;
for(j=0;j<c-1;++j){
out[idx++] = tolower(curr);
}
if(i < len-1){
out[idx++]='-';
}
c++;
}
out[idx++]='\0';
return out;
}
#include <stdio.h>
int list_of_numbers[n];
for (int i = 0; i<n; i++) {
scanf("%d", &list_of_numbers[i]);
}
return 0;
}
}
#include <stdio.h>
}
}
}
int main() {
int n;
scanf("%d", &n);
int list_of_numbers[n];
for (int i = 0; i<n; i++) {
scanf("%d", &list_of_numbers[i]);
}
return 0;
}
}