int main (void) { printf ("space is %d\n", ' '); return 0; }
#include <stdio.h> #include <conio.h> void main() { int height, line, i; clrscr(); scanf("%d", &height); for (i = 0; i < height - 1; ++i) printf(" "); printf("1\n"); for (line = 1; line < height; ++line) { for (i = 0; i < height - line - 1; ++i) printf(" "); for (i = 0; i < line; ++i) printf("%d", line + 1); printf(" "); for (i = 0; i < line; ++i) printf("%d", line + 1); printf("\n"); } getch(); }
int i = 2; while (i <= 1000) { printf ("%d\n", i); i++; }
#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }
Try this: #include <stdio.h> int main (void) { printf ("printf is at location %p\n", (void *)printf); printf ("main is at location %p\n", (void *)main); return 0; }
No, do not skip a space between the $ sign and the amount.
Here is the code to do it: #include<stdio.h> main() { int n, c, k, space = 1; //Here we ask for the number of rows would be : printf("Enter number of rows\n"); scanf("%d",&n); space = n - 1; //This is the first half of the diamond for ( k = 1 ; k <= n ; k++ ) { for ( c = 1 ; c <= space ; c++ ) printf(" "); space--; for ( c = 1 ; c <= 2*k-1 ; c++) printf("*"); printf("\n"); } space = 1; //Here is the second half of the diamond for ( k = 1 ; k <= n - 1 ; k++ ) { for ( c = 1 ; c <= space; c++) printf(" "); space++; for ( c = 1 ; c <= 2*(n-k)-1 ; c++ ) printf("*"); printf("\n"); } return 0; } Hope that helped :)
int main (void) { printf ("space is %d\n", ' '); return 0; }
Best Answer - Chosen by Voters#include #includemain(){int i;clrscr();for(i=10;i
#include <stdio.h> #include <conio.h> void main() { int height, line, i; clrscr(); scanf("%d", &height); for (i = 0; i < height - 1; ++i) printf(" "); printf("1\n"); for (line = 1; line < height; ++line) { for (i = 0; i < height - line - 1; ++i) printf(" "); for (i = 0; i < line; ++i) printf("%d", line + 1); printf(" "); for (i = 0; i < line; ++i) printf("%d", line + 1); printf("\n"); } getch(); }
U skip a line by skipping one space between each blue lines
printf ("nested printf returned %d\n", printf ("inner printf\n"));
int i = 2; while (i <= 1000) { printf ("%d\n", i); i++; }
#include<stdio.h> main() { int i; for(i=1;i<=1;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=5;i++) { printf("*",i); } printf("\n"); for(i=1;i<=3;i++) { printf("*",i); } printf("\n"); for(i=1;i<=1;i++) { printf("*",i); } }
void main() { int a,b,c; clrscr(); printf("Enter the value of a:"); scanf("%d",&a); printf("\nEnter the value of b:"); scanf("%d",&b); printf("\nEnter the value of c:"); scanf("%d",&c); if(a>b) { if(a>c) { if(b>c) { printf("c is smallest\n"); printf("b is middle\n"); printf("a is largest\n"); } else { printf("b is smallest\n"); printf("c is middle\n"); printf("a is largest\n"); } } else { printf("b is smallest\n"); printf("a is middle\n"); printf("c is largest\n"); } } else if(b>c) { if(a>c) { printf("c is smallest\n"); printf("a is middle\n"); printf("b is largest\n"); } else { printf("a is smallest\n"); printf("c is middle\n"); printf("b is largest\n"); } } else { printf("a is smallest\n"); printf("b is middle\n"); printf("c is largest\n"); } getch(); }
Printf function is used in c language. Printf is used to print something to the standard output. ex: printf ('welcome');
Some synonyms for the verb to skip are to pass over, miss, omit; or spring, bound, leap. Some synonyms for the noun skip are blank, empty space; or step, spring, bounce.