15,551 Topics
| |
I have never learn python and i need to write one small program in it. I have C++ code so can someone convert that code to python code ? code: #include <stdio.h> int N; struct { int y, x1, x2; } platforme[100]; int spusti(double x, int y) { int rez … | |
Hi, I try to convert the c code into python it actually complie but no result came out Code in C #include <stdio.h> # include <math.h> double const pi=3.1415926535897932384626433; double const twopi=2.0*pi; double const halfpi=pi/2.0; float cos_32(float x) { int quad; x=fmod(x,twopi); if (x<0) { x=-x; } quad=int(x/halfpi); switch (quad) … | |
Design a program to compute the gross pay of worker named michael bryan given that michael bryan worked 80hours to php67.97 per hour | |
| Hey, Im working on the UNO game in python and am almost done with the rest of the code but I am not able to print the UNO logo as of yet. Please help. I need to submit my work tomorrow. |
I am trying to convert the GMT time into unix epoch (starting from 1970), looks like there is a small bug in code , i could not get and exhausted. I see following difference Non leap years Expected output: Jan 20 19:00:01 2019 GMT = 1548010801 Actual output: 1548097201 (which … | |
I need a software that can automatically log into a series of accounts to a website, available data acount list, we need software to automatically log in continuously to check whether the account is alive or dead and check. check nickname in the game, and amount in the account | |
Write a program that prompts the user to input (word/statement), Accepts only letters. The program then: 1.Remove all the vowels from the (word /statement) then output the (word /statement) without vowels. 2. Outputs the number of vowels. 3. Convert the lowercase vowels letters to uppercase and vice versa. Conditions: 1. … | |
QUESTION Design a C program to calculate the total payment for the parking summons issued by Majlis Perbandaran Kuantan (MPK). The user needs to pay the summon within 5 days. There will be a 10% discount if user pay the summon within 5 days. After 5 days, a penalty will … | |
Write a C# console program that allows the user to edit an address book by displaying the following menu to the user: 1- Add New Address 2- Delete Address 3- Modify Address 4- View Address 5- Quit when the user enters 1 the program just displays "You wish to add … | |
So, basically this code is for a Tic Tac Toe game, I'm trying to make a Singleplayer mode where Player 1 inserts a spot number to put his X, and Player 2 uses a random number generating function and assigns his O in a random spot. Everything works fine except, … | |
// c program to add 10 elements entered by the user #include <stdio.h> int main () { int i; float elements[10]; //declaring the array float sum = 0; for (i = 0; i < 10; ++i) { printf ("Enter element %d: ", i + 1); //getting the elements from the … | |
I have a code of c++ and i want to convert it into python i shall be thankful to you. | |
public static void main(String[] args) Scanner.sc=new Scanner(System.in); String name = new String(new char[30]); final String pizza1 = "Chicken Fazita"; final String pizza2 = "Chicken Bar BQ"; final String pizza3 = "Peri Peri"; final String pizza4 = "Creamy Max"; final String roll1 = "Chicken Chatni Roll"; final String roll2 = "Chicken … | |
| Hi guys. I want your help to convert this program from c++ to c language The question is :-A manufacturer wishes to determine the cost of producing an open-top cylindrical container. The surface area (of the container is the sum of the area of the circular base plus the area … |
does anyone please have the connect four game program in c language? I need it for an exam | |
So, basically what I'm trying to do is a Tic Tac Toe game for a project. I started with making 3 1-D Char Arrays to represent the game's bord. the code below compares the Arrays data to try and figure out if any of the winning possibilites were achieved by … | |
How can I write the code such that - 1. I am reading the file which may contain numbers such as 23 34 45 56. 2. After reading the contents of the file, the contents of the file get stored to struct array such as struct abc in the above … | |
| |
Hello, i have some problems with my c code, could you help me? it's returns randomly numbers for averages. #include<stdio.h> #include<stdlib.h> struct Student MStudent(struct Student std); void CalcAvrg(struct Student std); struct Student{ int mark[5][5]; }; struct Student MStudent(struct Student std){ int i,j; for(i=0;i<5;i++){ for(j=0;j<5;j++){ printf("%d. Student's mark for %d. exam … | |
int my number [10]; void fun(int input, int* addr){ if (input %2 == 0){ *addr = 1; } } int main (){ int i; for (i = 0; i < 10; i+=1){ fun(number[i], &number[i]); } return 0; } | |
I want mini project of data structure using c language can anyone give source code?? | |
התוכנה כותבת לי שגיאה על המילה strndup אולי מישהו יודע אם זה משתנה בגרסאות של וויזואל סטודיו ואיך אפשר לסדר זאת? char tav = str[strlen(str)/2+1]; int a,b,anser; char* as = strndup(str, strlen(str) / 2 - *str); char* bs = strndup(str+ strlen(str) / 2 - *str+2, strlen(str) / 2 - *str); … | |
#include <iostream> using namespace std; int main () int charge, aftercharge, parking_hours; cout << "please put your parking hours: " ; cin >> parking_hours; if (parking_hours>=1) { charge = 1 ; } else if (parking_hours>=11) { charge = 2.50 ; } else if (parking_hours>=12) { charge = 6.00 ; } … | |
#include<stdio.h> #define SIZE 10 struct stack{ int a[SIZE]; int top; }; struct stack s; s .top=-1; void push(int value); void pop(); void display(); void peakelement(); int main() { int choice,value; while(1) { printf("\n1.push 2. pop 3.display 4. peakelement 5. exit"); printf("enter your choice"); scanf("%d",&choice); if(choice==1) { printf("enter value to be … | |
JQ is taking a car trip with his family. On the trip, he will stop for fuel, food or lodging. When stopping for gas, JQ will record the amount of fuel he is willing to pay for. When the family stops for lodging, they will also have a meal. JQ … | |
I would like to know what is the difference betn getchar(),getch(), and getche() functions and which should be used in which conditions. Thanks, comwizz. :confused: | |
Hello, I have been trying to get this robot to work out and be able to move around. I am just so confused as to how to get my arrow to get even displayed and moved when pressed by one of the directions to go. One area that I struggle … | |
write down a program which generates numbers from 1 to 10 but in following format in C++ 1 2 3 4 5 6 7 8 9 10 | |
This is my Code C++ for my assignment. Please help me to convert it to C code. Thank you! #include<iostream> using namespace std; #define N 10 int main() { int array[N],p,q; for(int i=0;i<N;i++) array[i]=i; cout<<"For instance, given elements are "; for(int i=0;i<N;i++) cout<<array[i]; cout<<endl; int r=0; while(cin>>p) { cin>>q; if(p>=0 … |
The End.