Print 1 to 10 Using For Loop [C Programming] May 04, 2017 #include <stdio.h>void main(){ int i; for(i=1; i<=10; i++) { printf("%d ", i); }} Share Get link Facebook X Pinterest Email Other Apps Labels C Programming Share Get link Facebook X Pinterest Email Other Apps Comments
Currency Converter - USD & BDT [C Programming] May 04, 2017 #include <stdio.h> void main() { int i; float usd, bdt; printf("Press 1 to convert USD to BDT\nPress 2 to convert BDT to USD\n"); printf("Enter your choice: "); scanf("%d", &i); switch(i) { case 1: printf("Enter amount in USD: "); scanf("%f", &usd); bdt = usd * 80; printf("1 USD = 80 BDT\n"); printf("%0.3f USD = %0.3f BDT", usd, bdt); break; case 2: ... Read more
Take Integer, Float, Character as Input & Print Them in Console [C Programming] May 04, 2017 #include <stdio.h> void main() { char ch; int i; float f; printf("Enter a character: "); scanf("%c", &ch); printf("Enter an integer: "); scanf("%d", &i); printf("Enter a fraction number: "); scanf("%f", &f); printf("Character: %c\nInteger: %d\nFloat: %f", ch, i, f); } Read more
Print 10 to 1 Using While Loop [C Programming] May 04, 2017 #include <stdio.h> void main() { int i=10; while(i >= 1) { printf("%d ", i); i--; } } Read more
Comments
Post a Comment