SCHOOL05-Editorial

PROBLEM LINK:

Practice : SCHOOL05 Problem - CodeChef

Contest :Contest Page | CodeChef

Author: laks
Tester: travelerkm23
Editorialist: laks

DIFFICULTY:

CAKEWALK.

PREREQUISITES:

Basic Knowledge of a string.

PROBLEM:

You have given a number from which you have to calculate the number of 5 present in a given number and if you find it correctly you win the game and you get laddus.

Input: - First line will contain integer N, shows number entered.

Output:

For each testcase, output in a single line answer given the number of 5 in given number.

Sample Input:

5554

QUICK EXPLANATION:

In this, a problem you have to create a program in which you should enter the number containing five or not your choice and output should give number of 5 present in input.

EXPLANATION:

In this, you have to write code like this first, you have to write string then write for loop till the end of the string then write if statement with condition that for each element in string check 5 is present or not if yes increment variable otherwise not then, finally print the variable.

SOLUTIONS:

[details=“Setter’s Solution”]
https://www.codechef.com/viewsolution/25772231