Skip to content

Instantly share code, notes, and snippets.

@sharifbdp
Created July 9, 2019 10:47
Show Gist options
  • Save sharifbdp/9a43fa8b936c5625ca53fd33bb206d79 to your computer and use it in GitHub Desktop.
Save sharifbdp/9a43fa8b936c5625ca53fd33bb206d79 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main()
{
int n, i;
scanf("%d",&n);
for (i = 1; i <= n; i++) {
if (i % 2 == 0) {
printf("-");
}
else {
printf("+");
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment