Structured Programming
1. A function TestNum() will take a six-digit string as a parameter.
The function will test whether the string meets certain conditions and will return an integer value as follows:
Return value | Condition | Example |
1 | The last three digits are the same but non-zero. | "253444" |
2 | The last three digits are zero. | "253000" |
3 | The first three and last three digits are the same. | "410410" |
The function will return the highest possible value for the given string.
If the string does not meet any of the conditions, zero is returned.
Write pseudocode for function TestNum().
Assume that the parameter is valid.
Ai এর মাধ্যমে
১০ লক্ষ+ প্রশ্ন ডাটাবেজ
প্র্যাকটিস এর মাধ্যমে নিজেকে তৈরি করে ফেলো
উত্তর দিবে তোমার বই থেকে ও তোমার মত করে।
সারা দেশের শিক্ষার্থীদের মধ্যে নিজের অবস্থান যাচাই
No related questions found