Skip to content
This repository was archived by the owner on Dec 1, 2022. It is now read-only.

Latest commit

 

History

History
16 lines (14 loc) · 497 Bytes

File metadata and controls

16 lines (14 loc) · 497 Bytes
Module 2

Back to Prep for Class 1

Exercise: String with Indexes

Write a program that receives a string from the user, and then loops over the string and prints each character along with the index of that character, like so:

$ ./stringindexes
Give me a string please: Bagel
The character at index 0 is B
The character at index 1 is a
The character at index 2 is g
The character at index 3 is e
The character at index 4 is l