デイリーコーディング
755 ワード
1日目(2020年10月13日)
Codesignal百年祭.CPP
Codesignal百年祭.CPP
int centuryFromYear(int year) {
if(year<=0)
std::cout << "Enter valid year";
else if (year <= 100)
return 1;
else if (year % 100 == 0)
return year/ 100 ;
else
return year/ 100 + 1 ;
return 0;
}
GeeksforgeeksスモファレレイズCPP//User function template for C++
class Solution{
public:
// function to return sum of elements
// in an array of size n
int sum(int arr[], int n) {
// code here
int SUM=0;
for(int i=0; i<n; i++)
{
SUM+=arr[i];
}
return SUM;
}
};
Reference
この問題について(デイリーコーディング), 我々は、より多くの情報をここで見つけました https://dev.to/shreyadhir/daily-coding-1-ci9テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol