Computer Science, asked by nitin08goilkar, 1 year ago

write a code find out all positive whole number X and Y satisfying the equation X+Y=130

Answers

Answered by sonisupriya1
0
hey
here are some possible one
100+30
80+50
110+20
120+10
70+60
90+40
130+0
Answered by franktheruler
0

Answer:

# include < stdio. h >

int main ( )

{

int i , n = 130 ;

for ( i = 1 ; i < 130 ; i + + ) // for loop

{

 if ( i + ( n - i ) == 130 )

  {   printf ( " x = % d ", i ) ;

      printf (  " y = % d ", ( n - i ) ) ;

   }

return 0 ;

}

printf is used for printing any message.

main is a function.

void is data return type.

for loop is used for doing same job repeatedly.

Similar questions