Answers for "c programming basic"

4

c programming examples

#include<stdio.h>
#include<conio.h>
void main()
{
	char choise;
	
	char hel;
	
	int p,k,g;
	
	int b,c,e;
	
	printf("\n Welcome to GM Program :) \n\n It's a one time usalbe program so you can start the program again and again");
	printf("\n\n Type 't' for Tables");
	printf("\n\n Type 'h' for ASMD is Add,Sub,Mul,Div");
	printf("\n\n Enter :- ");
	scanf("%c",&choise);
	
	switch(choise)
	{
		case 't':
		printf("\n\n Enter a number to make the table :- ");
		scanf("%d",&p);
		for(k=1;k<11;k++)
		{
			g=p*k;
			printf("\n\n %dx%d=%d",p,k,g);
		}
		break;
		case 'h':
		printf("\n\n Type 'a' for add \n\n Type 's' for sub \n\n Type 'm' for mul \n\n Type 'd' for div");
		printf("\n\n Enter :- ");
		scanf("%s",&hel);
		switch(hel)
		{
			case 'a':
			printf("\n\n Enter two number to add :- ");
			scanf("%d%d",&b,&c);
			e=b+c;
			printf("\n\n Your answer :- %d+%d=%d",b,c,e);
			break;
			case 's':
			printf("\n\n Enter two number to sub :- ");
			scanf("%d%d",&b,&c);
			e=b-c;
			printf("\n\n Your answer :- %d-%d=%d",b,c,e);
			break;
			case 'm':
			printf("\n\n Enter two number to mul :- ");
			scanf("%d%d",&b,&c);
			e=b*c;
			printf("\n\n Your answer :- %dx%d=%d",b,c,e);
			break;
			case 'd':
			printf("\n\n Enter two number to div :- ");
			scanf("%d%d",&b,&c);
			e=b/c;
			printf("\n\n Your answer :- %d/%d=%d",b,c,e);
			break;
	   }	
	}
	getch();	
}
/* program with switch and loop */
Posted by: Guest on July-23-2021
0

learn c programming

Three best resourse to learn c++  programming in simple ways-
1. https://www.geeksforgeeks.org/c-programming-language/
2. https://www.w3schools.in/c-tutorial/
3. https://www.programiz.com/c-programming

for video tutorials=
Top programing yt channels=
1. ProgrammingKnowledge.
2. Treehouse. This is the official YouTube home of teamtreehouse.com. ...
3. Learncode.academy. ...
4. Derek Banas. ...
5. TheNewBoston. ...
6. Kudvenkat. ...
7. DevTips. ...
8. CSS-Tricks.
9. code with harry
Posted by: Guest on October-27-2021

Code answers related to "c programming basic"

Code answers related to "Objective-C"

Browse Popular Code Answers by Language