samedi 7 octobre 2017

C++ cout statements under if else are not printing

everybody, I'm very new to C++ and have been trying to sort out why my some of my cout statements aren't printing. I have tried doing some research but still haven't been able to fix it. I would appreciate any help.

This is my code I was trying to use cin to set the value of x and then use the else if ladder to print out different strings depending on the value of x.

When 1 is entered as the value for x I get my expected output. " I hope its prints past this very first line. " " IT DID print past that first line "

However when 2 is entered as the value for x the cout statements do not print. When 2 is entered the cout statements under else-if don't print

Aucun commentaire:

Enregistrer un commentaire