Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Multiple User Input from single scanf (http://www.go4expert.com/forums/multiple-user-input-single-scanf-t11475/)

usama_muneeb 19Jun2008 17:42

Multiple User Input from single scanf
 
Hi,

How do we get multiple user input in a single scanf. Is it OK:

Code:

scanf("%f %d", &a, &b);
?

Also, using a switch statement, is it possible to enter all statements in braces except break?

e.g.

Code:

switch ( operator ) {
      case 'S':
      {
      statement;
      statement;
      }
      break;
}

?


All times are GMT +5.5. The time now is 20:14.