Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me turn this code to pseudocode. Provide explanation if you can. 1 2 3 5 6 8 9 10 11 13 14

image text in transcribedCan someone help me turn this code to pseudocode. Provide explanation if you can.

1 2 3 5 6 8 9 10 11 13 14 15 16 18 19 21 23 24 25 26 27 28 29 31 32 33 35 *include #include int main() { char input[2e]; char [20 = {"Canada", "England", "France", "Germany", "India", "Israel" ' Italy", "Japan", "mexico" , "China", "Russia", "United States", "Australia", "Brazil", "Denmark" , "Egypt", "Finland", "Greece", "Hungary", "Iceland", "Indonesia", "Jordan", "Kenya", "Lebanon", "Nepal", "Onan", "Peru", char = {"Ottawa", "London", "Paris"' "Bonn", "New Delhi", "Jerusalem", "Rome", "Tokyo", "Mexico City" "Cairo", "Helsinki", "Athens", "Budapest", "Reykjavik", "Jakarta", "Nairobi", "Beirut", "Katyunandu", "muscat", while (1) { the name of a country or capital (or end to exit): O); input); if (strcmp(input, "end ) break; int found = e; for (int i = e; i < 38; i++) { ilf (strcmp(input, countries[i]) e) { capital of Xs is Xs ", countries[i], capitals[i]); "Qatar", "Ranania", "Sweden", "Thailand"}; "Beijing", "%scou", "Washington", "Canberra" , "Brasilia" , "Copenhagen" , "Lima", "Doha", "Bucharest", "Stockholm", "Bangkok"}; if return found = 1 break; else if (strcmp(input, capitals[i]) e) { printf( "The country of Xs is Xs ", capitals[i], countries[i]); found break; ( ! found) { printf( "Sorry, the input is not valid. Xn"); e;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions