Saturday, August 21, 2010

Control loop statements(c programme)!?

what can i do to separate the integers number of 4 digits or should i say it's an array diagonal statements??..





eg: 1234





1 234


12 34


123 4Control loop statements(c programme)!?
int n=1234%10


This will give you 4


int y=1234/10


This will give you 123. I can see a pattern emerging here. Can you?Control loop statements(c programme)!?
Usually a program is not a linear sequence of instructions. It may repeat code or take decisions for a given path-goal relation. Most programming languages have control flow statements (constructs) which provide some sort of control structures that serve to specify order to what has to be done to perform our program that allow variations in this sequential order:





* statements may only be obeyed under certain conditions (conditionals),


* statements may be obeyed repeatedly under certain conditions (loops),


* a group of remote statements may be obeyed (subroutines).





Logical Expressions as conditions


Logical expressions can use logical operators in loops and conditional statements as part of the conditions to be met.
divide the no by 1000 ,100 nd den by 10;


get the remainder using % operator nd print both using blank!!!!!
  • make up
  • No comments:

    Post a Comment