How would i break out of this while loop?Code:#include <stdio.h> int main() { int total_value=0; printf("Line: "); // user enters a word/sentence char mynum; scanf("%c",&mynum); while(mynum!='.') // while the entry isn't '(period)' { mynum+=total_value; } printf("Total values are %d",mynum); return 0;
Begins if i enter something other than (period), it keeps re-prompting me over and over again.