Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a.

Similar presentations


Presentation on theme: "Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a."— Presentation transcript:

1 Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a comment. Please also save each file as lab number and your name. Please submit the zip file of your programs to TA 11/12/2015Lab51

2 Program I Create random string and store it in char array. String size is also random. dasdSfsbfjhjgDyytSfgdfjkujgAhnvbdfhjkhHJHy dtbfKJHgfd. The string size is (answer). Press any key to continue. 11/12/2015Lab52

3 Program II Create random string and then convert all lowercase letter to uppercase. dasdSfsbfjhjgDyytSfgdfjk DASDSFSBFJHJGDYYTSFGDFJK Press any key to continue. 11/12/2015Lab53

4 Program III Create random string and then count how many the character user input are in the string. dasdSfsbfjhjgDyytSfgdfjk Please input a letter: j There are 3 ‘j’s in the string. Do you want to check more?(y/n): y Please input a letter: S There are 2 ‘S’s in the string. Do you want to check more?(y/n): n Press any key to continue. 11/12/2015Lab54

5 (Option) Program IV Declare char array and initialize with the sentence, “I am a boy. You are a girl.” (not using scanf) Now the program check if the word user input is in the sentence. “I am a boy. You are a girl.” Please input a word: boy(enter) Yes, there is “boy” in the sentence. Do you want to check more(y/n)?y Please input a word: Girl(enter) No, there is no “Girl” in the sentence. Do you want to check more(y/n)?n Press any key to continue. 11/12/2015Lab55


Download ppt "Lab5 Please submit the lab before you leave Please include at a minimum your name, the date, and the lab- program number at the top of the program as a."

Similar presentations


Ads by Google