/*without argument without return value
without argument with return value
with argument without return value
with argument with return value*/
int sum(int a, int b);
void printstar(int n){
for(int i=0; i<n; i++){
printf("%c\n",'*');
}
printf("%c\n",'*');
}
// int takenumber(){
// int i;
// printf("enter a number");
// scanf("%d",&i);
// }
int main(){
int a,b,c;
a=9;
b=87;
c=sum(a,b);
printstar(7);
// c=takenumber();
printf("the sum is %d\n",c);
return 0;
}
int sum(int a,int b){
return a+b;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter