No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
15 Posted Topics
im creating a program that will convert certain character into its ascii value then i will change the value. for example the ascii value of A is 65 right? but i want to change the value of it into 1 so if i input A the output of it is … | |
how can i convert this into a struct? the program is prnting all the even nos [CODE]void main() { int num[5],even[5],count,j=0; clrscr(); printf("Enter 5 numbers\n"); for(count=0;count<5;count++) { scanf("%d",&num[count]); } for(count=0;count<5;count++) { if((num[count]%2)==0) { even[j]=num[count]; j++; } } printf("EVEN:\n"); for(count=0;count<j;count++) { printf("%d\t",even[count]); } getch(); }[/CODE] | |
can someone please tell me how am i suppose to start my program ? i have 20 integers (1-20) the user will input what number should start and the count interval . its a bit confusing only 5 numbers should be left numbers who are already counted will not be … | |
i have a 6x6 array . a certain object randomly moves within the boxes , i need to count the steps he makes for him to able to step all the boxes , i dont know what to do nxt with my code . the dot represents the boxes : … | |
i dont have idea what string function must be used to find consecutive characters . example is the word commit it will output the letter m . tnx for th help :D | |
i need to insert a character on a string . for example input is : cafe the output should be caxzfe . i insert xz . i just know how to concatenate two strings but when inserting a character in a string im totally lost . | |
[CODE]#include.. int x,y,x1,x2,y1,y2; int midpoint (int x, int y) { x=2(x1+x2); y=2(y1+y2); } void main() { clrscr(); printf("enter 4 points"); scanf("%d %d %d %d",&x1,&x2,&y1,&y2); midpoint(x,y); printf("the midpoint is %d %d",x,y); getch(); } [/CODE] i cant run my program i think there's a problem in the function midpoint but i cant … ![]() | |
im creating a cartesian plane i will plot the points but how am i supposed to determine if the points create a single straight line ? tnx | |
im entering points in cartesian plane , how am i supposed to plot that points in my program | |
[CODE]#include<graphics.h> #include<conio.h> int main() { int gd = DETECT, gm; int x1=50,y1=50,x2=200,y2=100; initgraph(&gd, &gm, "C:\\TC\\BGI"); setcolor(9); line(x1,y1,x2,y2); getch(); closegraph(); return 0; }[/CODE] here's my code in drawing a simple line in C . but it has errors it said that "undefined symbol _closegraph in module LINE.cpp (LINE is the name … | |
im creating a simple game and i want it to have continous 10 rounds . but i dont have any idea , im not allowed to use looping .tnx | |
i dont know how to random select a word in c . a big help is highly appreciated .. tnx :) for example the words are Ana,Lorie and Denise . how to random select from those words ? | |
I am confused as to where Am I supposed to assigned a variable . my code goes like this [CODE]char text[]= "FRUITS"; printf("Enter between apple,orange or mango"); gets(text);[/CODE] I want to assign a variable "User_select" to that printf part . | |
how do i determine the winner in a game rock paper scissor ? i have 10 rounds and the one who has 7wins shall be declared as the winner but how am i supposed to do that ? great help is highly appeciated :) | |
hi there ! im new to programming , i cant figured out how to determine the highest even number and the lowest odd number among three numbers in C . does anyone out there have an idea ? i badly need your help . tnx in advance :))) |
The End.