🔒 Closed Pa help naman po about sa increment

Status
Not open for further replies.
if same tayo ng schoolnat classmate tayo. tayong dawala makakasagot niyan. hahaha

ayieee ang sweet nila nyahahahahaha
hahaha

ganito kasi yan

initial value from declaration of X is 1
condition x<=10: meaning nito is mag stostop ang loop hanggang ang value ni x ay 11
x++ naman is same as this x = x + 1
ang tawag diyan postincrement

mag stop po siya sa 9 nyahahahaha

lets say 11 po mag stop po siya sa 10 nyahahahaha
 
decoder for cp
dev c++ for p. c


In this program, value of “i” is incremented one by one from 1 up to 9 using “i++” operator and output is displayed as “1 2 3 4 5 6 7 8 9”. nyahahahh


#include <iostream>
int main()
{
int ateh=1;
for(ateh<100)
{
cout << ateh++ << endl;

cout << ++ateh << endl;

return 0;
}
}


Source: https://fresh2refresh.com/c-programming/c-operators-E×ρréššions/c-increment-decrement-operators/
 
In this program, value of “i” is incremented one by one from 1 up to 9 using “i++” operator and output is displayed as “1 2 3 4 5 6 7 8 9”. nyahahahh


#include <stdio.h>
int main()
{
int i=1;
while(i<10)
{
printf("%d ",i);
i++;
}
}


Source: https://fresh2refresh.com/c-programming/c-operators-E×ρréššions/c-increment-decrement-operators/
for loop po sana
 
mula basic. may certificate daw pag natapos. hahaha
 

Attachments

  • Screenshot_20180818-204420.webp
    Screenshot_20180818-204420.webp
    60.6 KB · Views: 14
  • Screenshot_20180818-204432.webp
    Screenshot_20180818-204432.webp
    52.9 KB · Views: 15
  • Screenshot_20180818-204653.webp
    Screenshot_20180818-204653.webp
    56.6 KB · Views: 13
Status
Not open for further replies.

About this Thread

  • 158
    Replies
  • 7K
    Views
  • 30
    Participants
Last reply from:
Jmrie_

Trending Topics

Online now

Members online
701
Guests online
2,846
Total visitors
3,547

Forum statistics

Threads
2,301,213
Posts
29,141,459
Members
1,199,863
Latest member
shwnnpov
Back
Top